diff --git a/script.js b/script.js index a053bb7..f7c80d2 100644 --- a/script.js +++ b/script.js @@ -733,6 +733,12 @@ headers: {} }).then(function mySuccess(result) { console.log("rslt",result) + result.data = $sce.trustAsHtml(result.data); + console.log(result.data) + // { + // results[i].content = $sce.trustAsHtml(response.data.data[i].content); + // } + //$scope.languages = results; }); } @@ -811,70 +817,72 @@ data: data, headers: {} }).then(function mySuccess(paymentResult) { - $scope.paymentResult = paymentResult; + $scope.paymentResult = paymentResult; + $location.path("/confirmation") }, function myError(error) { }); } - var i = 0; - $scope.payingAmnt = $scope.payingAmnt * 100; - var options = { - //"key": "rzp_test_YwHsVFiDIQ2WUQ", - "key": "rzp_live_mkmCb4FkstuWaS", - "amount": $scope.payingAmnt, - - "name": "Startup Jalsa", - "description":"amount", - "currency": "INR", - "status": "done", - - "prefill": { - "email": $scope.detail.email, - "contact": $scope.detail.phone - }, - - "theme": { - "color": "#2196f3 ", - "image_padding":"NO" - }, - "modal": { - "ondismiss": function(){ - } - }, - "handler": function (response){ - createPayment(response); - } - }; - var rzp1 = new Razorpay(options); - rzp1.open(); - $scope.paymentResponse = {}; - function createPayment(response){ - console.log("response12333333",response) - $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; - $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; - $scope.paymentResponse.amount = data.amount; - $scope.paymentResponse.currency = "INR"; - $scope.paymentResponse.status = $scope.paymentResult.data.status; - console.log("$scope.paymentResponse.amount=====",$scope.paymentResponse.amount) - $http({ - method: 'PUT', - url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, - data: $scope.paymentResponse, - headers: {} - }).then(function mySuccess(searchResult) { - console.log("searchResult",searchResult) - $location.path("/confirmation") - }, function myError(error) { - }); - } - //} - - }, function myError(error) { - - }); + // var i = 0; + // $scope.payingAmnt = $scope.payingAmnt * 100; + // var options = { + // //"key": "rzp_test_YwHsVFiDIQ2WUQ", + // "key": "rzp_live_mkmCb4FkstuWaS", + // "amount": $scope.payingAmnt, + + // "name": "Startup Jalsa", + // "description":"amount", + // "currency": "INR", + // "status": "done", + + // "prefill": { + // "email": $scope.detail.email, + // "contact": $scope.detail.phone + // }, + + // "theme": { + // "color": "#2196f3 ", + // "image_padding":"NO" + // }, + // "modal": { + // "ondismiss": function(){ + // } + // }, + // "handler": function (response){ + // createPayment(response); + // } + // }; + // var rzp1 = new Razorpay(options); + // rzp1.open(); + // $scope.paymentResponse = {}; + // function createPayment(response){ + // console.log("response12333333",response) + // $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; + // $scope.paymentResponse.razorOrderId = $scope.paymentResult.data.razorOrderId; + // $scope.paymentResponse.amount = data.amount; + // $scope.paymentResponse.currency = "INR"; + // $scope.paymentResponse.status = $scope.paymentResult.data.status; + // console.log("$scope.paymentResponse.amount=====",$scope.paymentResponse.amount) + // $http({ + // method: 'PUT', + // url: BASE_URL+'/payments/'+$scope.paymentResult.data.id, + // data: $scope.paymentResponse, + // headers: {} + // }).then(function mySuccess(searchResult) { + // console.log("searchResult",searchResult) + // $location.path("/confirmation") + // }, function myError(error) { + // }); + // } + // //} + + // }, function myError(error) { + + // }); // }) //} + }) }