Commit 19a2e7b14bffcbfbf85f3100948db3fb83e7384d

Authored by apple
1 parent 78d000d661
Exists in master

payment integrate

Showing 2 changed files with 82 additions and 64 deletions   Show diff stats
pages/registration.html
  1 +
1 2 <div class="header">
2 3 <div>
3 4 <!-- <img src="images/LOGO.png" class="logojalsa"><span class="jalsaheadr" style="">2018</span> -->
... ... @@ -7,9 +8,11 @@
7 8 </div>
8 9 <!-- CLOSE HEADER -->
9 10 <form name="applicantForm">
  11 +
10 12 <div class="col-xs-12 col-md-8 col-md-offset-2">
11 13 <div class="form-all">
12 14 <h4 class="title">General Information</h4>
  15 + <p></p>
13 16 <!-- <table style="width: 100%;">
14 17 <tr>
15 18 <td>
... ... @@ -303,7 +306,7 @@
303 306 <span id="delhi"></span>
304 307 <span id="ahmedabad"></span>
305 308 <span id="bengaluru"></span>
306   - <span id="jaipur"></span>kanpur
  309 + <span id="jaipur"></span>
307 310 <span id="kanpur"></span>
308 311 <span id="dharamsala"></span>
309 312 </span>
... ...
... ... @@ -619,7 +619,10 @@
619 619 $scope.formPage = false;
620 620 $scope.current = 0;
621 621 $scope.payingAmnt = 0;
622   - $scope.discountAmount = 0;
  622 + $scope.discountAmount = 0;
  623 + $scope.approvedMsg = false;
  624 + $scope.disApprovedMsg = false;
  625 +
623 626 // $scope.data.quantity = "1";
624 627 $scope.check = false;
625 628 $scope.numberCheck = false;
... ... @@ -628,7 +631,18 @@
628 631 "amount": $scope.payingAmnt,
629 632 "currency": "INR",
630 633 "status": "pending"
631   - }
  634 + }
  635 + var myParam = window.location.href.split('status=').splice(1).join('').split('&')[0]
  636 + console.log(window.location.href,"myParam",myParam)
  637 + if(myParam){
  638 + if(myParam == "approved"){
  639 + $scope.showResponse = true;
  640 + }else{
  641 + $scope.disApprovedMsg = true;
  642 + }
  643 + }else{
  644 + $scope.disApprovedMsg = true;
  645 + }
632 646  
633 647 $scope.removeError = function() {
634 648 $('#invalidEmail').css('display', 'none');
... ... @@ -785,7 +799,6 @@
785 799 }).then(function mySuccess(result) {
786 800 console.log("=====result=====",result)
787 801 $scope.detail = result;
788   - $location.path("/confirmation")
789 802 data.applicantId = result.data.id;
790 803 $scope.userId = result.data.id;
791 804 console.log("=====data=====",data)
... ... @@ -819,77 +832,79 @@
819 832 data: data,
820 833 headers: {}
821 834 }).then(function mySuccess(paymentResult) {
822   - $scope.paymentResult = paymentResult;
  835 + console.log("paymentResult",paymentResult.data.data)
  836 + $("p").html(paymentResult.data.data)
823 837 }, function myError(error) {
824 838 });
825 839 }
826   - // var i = 0;
827   - // $scope.payingAmnt = $scope.payingAmnt * 100;
828   - // var options = {
829   - // //"key": "rzp_test_YwHsVFiDIQ2WUQ",
830   - // "key": "rzp_live_mkmCb4FkstuWaS",
831   - // "amount": $scope.payingAmnt,
832   -
833   - // "name": "Startup Jalsa",
834   - // "description":"amount",
835   - // "currency": "INR",
836   - // "status": "done",
837   -
838   - // "prefill": {
839   - // "email": $scope.detail.email,
840   - // "contact": $scope.detail.phone
841   - // },
842   -
843   - // "theme": {
844   - // "color": "#2196f3 ",
845   - // "image_padding":"NO"
846   - // },
847   - // "modal": {
848   - // "ondismiss": function(){
849   - // }
850   - // },
851   - // "handler": function (response){
852   - // createPayment(response);
853   - // }
854   - // };
855   - // var rzp1 = new Razorpay(options);
856   - // rzp1.open();
857   - // $scope.paymentResponse = {};
858   - // function createPayment(response){
859   - // console.log("response12333333",response)
860   - // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
861   - // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
862   - // $scope.paymentResponse.amount = data.amount;
863   - // $scope.paymentResponse.currency = "INR";
864   - // $scope.paymentResponse.status = $scope.paymentResult.data.status;
865   - // console.log("$scope.paymentResponse.amount=====",$scope.paymentResponse.amount)
866   - // $http({
867   - // method: 'PUT',
868   - // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id,
869   - // data: $scope.paymentResponse,
870   - // headers: {}
871   - // }).then(function mySuccess(searchResult) {
872   - // console.log("searchResult",searchResult)
873   - // $location.path("/confirmation")
874   - // }, function myError(error) {
875   - // });
876   - // }
877   - // //}
878   -
879   - // }, function myError(error) {
880   -
881   - // });
  840 + // var i = 0;
  841 + // $scope.payingAmnt = $scope.payingAmnt * 100;
  842 + // var options = {
  843 + // //"key": "rzp_test_YwHsVFiDIQ2WUQ",
  844 + // "key": "rzp_live_mkmCb4FkstuWaS",
  845 + // "amount": $scope.payingAmnt,
  846 +
  847 + // "name": "Startup Jalsa",
  848 + // "description":"amount",
  849 + // "currency": "INR",
  850 + // "status": "done",
  851 +
  852 + // "prefill": {
  853 + // "email": $scope.detail.email,
  854 + // "contact": $scope.detail.phone
  855 + // },
  856 +
  857 + // "theme": {
  858 + // "color": "#2196f3 ",
  859 + // "image_padding":"NO"
  860 + // },
  861 + // "modal": {
  862 + // "ondismiss": function(){
  863 + // }
  864 + // },
  865 + // "handler": function (response){
  866 + // createPayment(response);
  867 + // }
  868 + // };
  869 + // var rzp1 = new Razorpay(options);
  870 + // rzp1.open();
  871 + // $scope.paymentResponse = {};
  872 + // function createPayment(response){
  873 + // console.log("response12333333",response)
  874 + // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id;
  875 + // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId;
  876 + // $scope.paymentResponse.amount = data.amount;
  877 + // $scope.paymentResponse.currency = "INR";
  878 + // $scope.paymentResponse.status = $scope.paymentResult.data.status;
  879 + // console.log("$scope.paymentResponse.amount=====",$scope.paymentResponse.amount)
  880 + // $http({
  881 + // method: 'PUT',
  882 + // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id,
  883 + // data: $scope.paymentResponse,
  884 + // headers: {}
  885 + // }).then(function mySuccess(searchResult) {
  886 + // console.log("searchResult",searchResult)
  887 + // $location.path("/confirmation")
  888 + // }, function myError(error) {
  889 + // });
  890 + // }
  891 + //}
  892 +
  893 + }, function myError(error) {
  894 +
  895 + });
  896 +
  897 + })
882 898  
883 899 // })
884 900  
885 901 //}
886   - })
887   - })
  902 +
888 903 }
889 904  
890 905 });
891 906  
892   -scotchApp.controller('ambassadorController', function($scope, $http, $location, $route,BASE_URL) {
  907 +scotchApp.controller('ambassadorController', function($scope, $http, $location, $route, BASE_URL) {
893 908 $scope.data = {};
894 909 $scope.check = false;
895 910 $scope.numberCheck = false;
... ...