Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

I have called a function inside a function but inner function is not working

$
0
0

@flycoders_sourav wrote:

I have called a function inside a function but inner function is not working please help me out
below my code

pay() {
    console.log(this.total_ammount)
    var options = {
      description: 'Payment To View Seller Profile',
      image: 'url',
      currency: 'INR',
      key: 'rzp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',// this key need to chage for every app
      amount: this.total_ammount,
      name: 'appname',
      prefill: {
        email: this.email,
        contact: this.mobile,
        name: this.name
      },
      theme: {
        color: '#F37254'
      },
      modal: {
        ondismiss: function() {
          alert('dismissed')
        }
      }
    };

    var successCallback = function(payment_id) {
      alert(payment_id);
**here i want to call a function**
      
      let postParams ={
        userid:'1',
        ammount:'100',
        payment_valid:'5',
    }
    alert(JSON.stringify(postParams));
 
    };
    var cancelCallback = function(error) {
      alert(error.description + ' (Error ' + error.code + ')');
    };
    RazorpayCheckout.open(options,successCallback,cancelCallback);
  }

I want to call a function inside the successCallback payment id show in alert(payment_id); box
when while i called a function this function is not working or fire
please help me out
Thanks in advace

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>