razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
107 stars 150 forks source link

autocapture enabled by default ? where to add orderid ? #36

Closed LOG-TAG closed 5 years ago

LOG-TAG commented 5 years ago

Web code:

var options = {
        key: "rzp_test_123455",
        amount: amount,  
       name: "example name",
        currency: "INR", 
        description: “desc”,
        image: "https://example.url", 
        handler:  (response) =>{
          this.verifySignature(response,this.ptype);
        },
        prefill: {
            name: this.cusName,
            email:   this.cusEmail,
             contact: this.cusPhone,
        },
        notes: {
            address: this.locationId
        },
        theme: {
            color: "#007bf9"
        }
      };

//smid got from orders capture api
 var rzp1 = new Razorpay({...options,order_id:smid});
        rzp1.open();

what is the similar code for flutter please update in docs or auto-capture in flutter is automated?(https://razorpay.com/docs/payment-gateway/orders/) what is the solution for flutter ? like belove we should pass capture API order_id?

void openCheckout() async {
    var options = {
      'key': 'rzp_test_12345',
      'amount': 2000,
      **'order_id': 'order_DUK12346hdh',**
      'name': 'Acme Corp.',
      'description': 'Fine T-Shirt',
      'prefill': {'contact': 'xxxx', 'email': 'sss@g.in'},
      'external': {
        'wallets': ['paytm']
      }
    };

    try {
      _razorpay.open(options);
    } catch (e) {
      debugPrint(e);
    }
  }

any other solution available?

LOG-TAG commented 5 years ago

solved by adding this 'order_id': 'order_DUK12346hdh',

PLEASE UPDATE IN DOCS

Abin56 commented 1 year ago

any repo..