Commit 51da4bffe44d4bdde122b676cd3aee74286924e5
1 parent
f7e1e85c34
Exists in
master
razor pay integrate
Showing
2 changed files
with
136 additions
and
133 deletions
Show diff stats
css/custom.css
script.js
... | ... | @@ -408,7 +408,8 @@ |
408 | 408 | } |
409 | 409 | |
410 | 410 | $scope.apply = function() { |
411 | - //Analytics.trackEvent('register', 'click', 'Registration'); | |
411 | + //Analytics.trackEvent('register', 'click', 'Registration'); | |
412 | + //$location.path("/caricatures") | |
412 | 413 | window.location.href = "https://startupjalsa.com/events#/caricatures?utm_source=RegisterNowUp&utm_medium=Reg"; |
413 | 414 | |
414 | 415 | } |
... | ... | @@ -771,140 +772,140 @@ |
771 | 772 | |
772 | 773 | } |
773 | 774 | }; |
774 | - if($scope.data.country == "INDIA"){ | |
775 | - $scope.submit = function() { | |
776 | - Analytics.trackEvent('register', 'click', 'Registration'); | |
777 | - $scope.loading = true; | |
778 | - $scope.data.uploadFile = $scope.base64textString; | |
779 | - console.log($scope.data.uploadFile) | |
780 | - // if($scope.tokencheck == false){ | |
781 | - // $scope.data.referalToken = null; | |
782 | - // } | |
783 | - // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | |
784 | - // var x = document.getElementById("snackbar") | |
785 | - // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); | |
786 | - // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | |
787 | - $scope.infoForm = true; | |
788 | - $scope.ticketAmnt = 1180; | |
789 | - $scope.detail = {}; | |
790 | - $scope.data.phone = "+91"+$scope.data.number; | |
791 | - if($scope.data.referalToken == null){ | |
792 | - $scope.data.referalToken = "NA" | |
793 | - } | |
794 | - var file =document.getElementById('filePicker').files[0]; | |
795 | - var image = BASE_URL+'/containers/images/download/' | |
796 | - var imagePath = file.name; | |
797 | - $scope.data.uploadFile = image + imagePath; | |
798 | - var fd = new FormData() | |
799 | - fd.append('filePicker',file); | |
800 | - var deferred = $q.defer(); | |
801 | - $http({ | |
802 | - method:'POST', | |
803 | - url: BASE_URL+'/containers/images/upload', | |
804 | - data:fd, | |
805 | - transformRequest:angular.identity, | |
806 | - headers:{'Content-Type':undefined} | |
807 | - }) | |
808 | - .success(function(result){ | |
809 | - deferred.resolve(result); | |
810 | - $http({ | |
811 | - method: 'POST', | |
812 | - url: BASE_URL+'/applicants', | |
813 | - data: $scope.data, | |
814 | - headers: {} | |
815 | - }).then(function mySuccess(result) { | |
816 | - $scope.detail = result; | |
817 | - data.applicantId = result.data.id; | |
818 | - $scope.userId = result.data.id; | |
819 | - var amount = $scope.ticketAmnt * 100 | |
820 | - if($scope.tokencheck == true){ | |
821 | - var amount = $scope.ticketAmnt | |
822 | - console.log("resultcity===",$scope.data.city) | |
823 | - if($scope.discountpercentage == "100") { | |
824 | - $scope.discountpercentage = "99.9"; | |
825 | - } | |
826 | - $scope.percDiscount = $scope.discountpercentage/100; | |
827 | - $scope.discountAmount = amount * $scope.percDiscount; | |
828 | - } | |
829 | - var taxAmount = $scope.ticketAmnt - $scope.discountAmount | |
830 | - $scope.payingAmnt = taxAmount; | |
831 | - $scope.payingAmnt = $scope.payingAmnt.toFixed() | |
832 | - data.amount = $scope.payingAmnt; | |
833 | - if($scope.detail != null){ | |
834 | - $http({ | |
835 | - method: 'POST', | |
836 | - url: BASE_URL+'/payments', | |
837 | - data: data, | |
838 | - headers: {} | |
839 | - }).then(function mySuccess(paymentResult) { | |
840 | - $scope.loading = false; | |
841 | - //$("p").html(paymentResult.data.data) | |
842 | - }, function myError(error) { | |
843 | - }); | |
844 | - } | |
845 | - var i = 0; | |
846 | - $scope.payingAmnt = $scope.payingAmnt * 100; | |
847 | - var options = { | |
848 | - //"key": "rzp_test_YwHsVFiDIQ2WUQ", | |
849 | - "key": "rzp_live_mkmCb4FkstuWaS", | |
850 | - "amount": $scope.payingAmnt, | |
851 | - | |
852 | - "name": "Startup Jalsa", | |
853 | - "description":"amount", | |
854 | - "currency": "INR", | |
855 | - "status": "done", | |
856 | - | |
857 | - "prefill": { | |
858 | - "email": $scope.detail.email, | |
859 | - "contact": $scope.detail.phone | |
860 | - }, | |
861 | - | |
862 | - "theme": { | |
863 | - "color": "#2196f3 ", | |
864 | - "image_padding":"NO" | |
865 | - }, | |
866 | - "modal": { | |
867 | - "ondismiss": function(){ | |
868 | - } | |
869 | - }, | |
870 | - "handler": function (response){ | |
871 | - createPayment(response); | |
872 | - } | |
873 | - }; | |
874 | - var rzp1 = new Razorpay(options); | |
875 | - rzp1.open(); | |
876 | - $scope.paymentResponse = {}; | |
877 | - function createPayment(response){ | |
878 | - $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | |
879 | - $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | |
880 | - $scope.paymentResponse.amount = data.amount; | |
881 | - $scope.paymentResponse.currency = "INR"; | |
882 | - $scope.paymentResponse.status = $scope.paymentResult.data.status; | |
883 | - $http({ | |
884 | - method: 'PUT', | |
885 | - url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, | |
886 | - data: $scope.paymentResponse, | |
887 | - headers: {} | |
888 | - }).then(function mySuccess(searchResult) { | |
889 | - Analytics.trackEvent('register', 'click', 'Registration'); | |
890 | - $location.path("/confirm") | |
891 | - }, function myError(error) { | |
892 | - }); | |
893 | - } | |
894 | - //} | |
895 | - | |
896 | - }, function myError(error) { | |
897 | - | |
898 | - }); | |
899 | - | |
900 | - }) | |
775 | + // if($scope.data.country == "INDIA"){ | |
776 | + // $scope.submit = function() { | |
777 | + // Analytics.trackEvent('register', 'click', 'Registration'); | |
778 | + // $scope.loading = true; | |
779 | + // $scope.data.uploadFile = $scope.base64textString; | |
780 | + // console.log($scope.data.uploadFile) | |
781 | + // // if($scope.tokencheck == false){ | |
782 | + // // $scope.data.referalToken = null; | |
783 | + // // } | |
784 | + // // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { | |
785 | + // // var x = document.getElementById("snackbar") | |
786 | + // // setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); | |
787 | + // // }else if($scope.data.name != undefined && $scope.data.email != undefined && $scope.data.number != undefined) { | |
788 | + // $scope.infoForm = true; | |
789 | + // $scope.ticketAmnt = 1180; | |
790 | + // $scope.detail = {}; | |
791 | + // $scope.data.phone = "+91"+$scope.data.number; | |
792 | + // if($scope.data.referalToken == null){ | |
793 | + // $scope.data.referalToken = "NA" | |
794 | + // } | |
795 | + // var file =document.getElementById('filePicker').files[0]; | |
796 | + // var image = BASE_URL+'/containers/images/download/' | |
797 | + // var imagePath = file.name; | |
798 | + // $scope.data.uploadFile = image + imagePath; | |
799 | + // var fd = new FormData() | |
800 | + // fd.append('filePicker',file); | |
801 | + // var deferred = $q.defer(); | |
802 | + // $http({ | |
803 | + // method:'POST', | |
804 | + // url: BASE_URL+'/containers/images/upload', | |
805 | + // data:fd, | |
806 | + // transformRequest:angular.identity, | |
807 | + // headers:{'Content-Type':undefined} | |
808 | + // }) | |
809 | + // .success(function(result){ | |
810 | + // deferred.resolve(result); | |
811 | + // $http({ | |
812 | + // method: 'POST', | |
813 | + // url: BASE_URL+'/applicants', | |
814 | + // data: $scope.data, | |
815 | + // headers: {} | |
816 | + // }).then(function mySuccess(result) { | |
817 | + // $scope.detail = result; | |
818 | + // data.applicantId = result.data.id; | |
819 | + // $scope.userId = result.data.id; | |
820 | + // var amount = $scope.ticketAmnt * 100 | |
821 | + // if($scope.tokencheck == true){ | |
822 | + // var amount = $scope.ticketAmnt | |
823 | + // console.log("resultcity===",$scope.data.city) | |
824 | + // if($scope.discountpercentage == "100") { | |
825 | + // $scope.discountpercentage = "99.9"; | |
826 | + // } | |
827 | + // $scope.percDiscount = $scope.discountpercentage/100; | |
828 | + // $scope.discountAmount = amount * $scope.percDiscount; | |
829 | + // } | |
830 | + // var taxAmount = $scope.ticketAmnt - $scope.discountAmount | |
831 | + // $scope.payingAmnt = taxAmount; | |
832 | + // $scope.payingAmnt = $scope.payingAmnt.toFixed() | |
833 | + // data.amount = $scope.payingAmnt; | |
834 | + // if($scope.detail != null){ | |
835 | + // $http({ | |
836 | + // method: 'POST', | |
837 | + // url: BASE_URL+'/payments', | |
838 | + // data: data, | |
839 | + // headers: {} | |
840 | + // }).then(function mySuccess(paymentResult) { | |
841 | + // $scope.loading = false; | |
842 | + // //$("p").html(paymentResult.data.data) | |
843 | + // }, function myError(error) { | |
844 | + // }); | |
845 | + // } | |
846 | + // var i = 0; | |
847 | + // $scope.payingAmnt = $scope.payingAmnt * 100; | |
848 | + // var options = { | |
849 | + // "key": "rzp_test_YwHsVFiDIQ2WUQ", | |
850 | + // //"key": "rzp_live_mkmCb4FkstuWaS", | |
851 | + // "amount": $scope.payingAmnt, | |
852 | + | |
853 | + // "name": "Startup Jalsa", | |
854 | + // "description":"amount", | |
855 | + // "currency": "INR", | |
856 | + // "status": "done", | |
857 | + | |
858 | + // "prefill": { | |
859 | + // "email": $scope.detail.email, | |
860 | + // "contact": $scope.detail.phone | |
861 | + // }, | |
862 | + | |
863 | + // "theme": { | |
864 | + // "color": "#2196f3 ", | |
865 | + // "image_padding":"NO" | |
866 | + // }, | |
867 | + // "modal": { | |
868 | + // "ondismiss": function(){ | |
869 | + // } | |
870 | + // }, | |
871 | + // "handler": function (response){ | |
872 | + // createPayment(response); | |
873 | + // } | |
874 | + // }; | |
875 | + // var rzp1 = new Razorpay(options); | |
876 | + // rzp1.open(); | |
877 | + // $scope.paymentResponse = {}; | |
878 | + // function createPayment(response){ | |
879 | + // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; | |
880 | + // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; | |
881 | + // $scope.paymentResponse.amount = data.amount; | |
882 | + // $scope.paymentResponse.currency = "INR"; | |
883 | + // $scope.paymentResponse.status = $scope.paymentResult.data.status; | |
884 | + // $http({ | |
885 | + // method: 'PUT', | |
886 | + // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, | |
887 | + // data: $scope.paymentResponse, | |
888 | + // headers: {} | |
889 | + // }).then(function mySuccess(searchResult) { | |
890 | + // Analytics.trackEvent('register', 'click', 'Registration'); | |
891 | + // $location.path("/confirm") | |
892 | + // }, function myError(error) { | |
893 | + // }); | |
894 | + // } | |
895 | + // //} | |
896 | + | |
897 | + // }, function myError(error) { | |
898 | + | |
899 | + // }); | |
900 | + | |
901 | + // }) | |
901 | 902 | |
902 | - // }) | |
903 | + // // }) | |
903 | 904 | |
904 | - //} | |
905 | + // //} | |
905 | 906 | |
906 | - } | |
907 | - }else{ | |
907 | + // } | |
908 | + // }else{ | |
908 | 909 | $scope.submit = function() { |
909 | 910 | Analytics.trackEvent('register', 'click', 'Registration'); |
910 | 911 | $scope.loading = true; |
... | ... | @@ -1038,7 +1039,7 @@ |
1038 | 1039 | //} |
1039 | 1040 | |
1040 | 1041 | } |
1041 | - } | |
1042 | + //} | |
1042 | 1043 | |
1043 | 1044 | }); |
1044 | 1045 | ... | ... |