#Aye-checkout

1 messages · Page 1 of 1 (latest)

drowsy grail
#

Hi, @uncut zealot may I know how did you make the checkout session creation API call?

#

@uncut zealot please remove your secret key, it's a public channel.

#

I've deleted the message, can you paste the code again without the secret key?

uncut zealot
#

const stripeCheckout = (<any>window).StripeCheckout.configure({

  key: '',
  locale: 'auto',
   
  source: (stripeToken: any) => {
    console.log(stripeToken);

    if (stripeToken.id != null) {
      this.t = true;
      this.payment_method = 'Stripe';
      this.payment_status = 'COMPLETED';
      this.payment_reference = stripeToken.id;
      this.saveDonation(this.payment_method, this.payment_reference, this.payment_status);
    }
  },
  closed: () => {
    console.log('closed');
    if (this.t == false) {
      this.payment_method = 'Stripe';
      console.log(this.payment_method, this.payment_status);
      this.payment_status = 'INCOMPLETED';

      this.openCancelDialog();
    }
  },
});

stripeCheckout.open({
  name: 'Donation',
  description: 'Payment',
  //amount: amount * 100,
  amount: this.totalAmount * 100,
  currency : this.cur,
  
});
drowsy grail
#

And which integration is it? React Native?

uncut zealot
#

angular

#

node js

drowsy grail
#

OK, and in which line do you see currency and amount = null ?

uncut zealot
#

{
"id": "src_1KGHgoCk5zSHv2TOX3ZjxXPd",
"object": "source",
"amount": null,
"card": {
"exp_month": 10,
"exp_year": 2025,
"last4": "1706",
"country": "MM",
"brand": "Visa",
"cvc_check": "unchecked",
"funding": "credit",
"three_d_secure": "optional",
"name": null,
"address_line1_check": null,
"address_zip_check": null,
"tokenization_method": null,
"dynamic_last4": null
},
"client_secret": "src_client_secret_4zNYj7RpfhhxoY45HSnoTkAK",
"created": 1641797350,
"currency": null,
"flow": "none",
"livemode": true,
"owner": {
"address": null,
"email": "psmung2012@gmail.com",
"name": "psmung2012@gmail.com",
"phone": null,
"verified_address": null,
"verified_email": null,
"verified_name": null,
"verified_phone": null
},
"statement_descriptor": null,
"status": "chargeable",
"type": "card",
"usage": "reusable"
}

#

in the log message

drowsy grail
#

Got it, amount and currency are required if you are creating a single-use source. Since this source is reusable, these two fields can be null.

uncut zealot
#

how can i solve to get money in stripe this amount and currency.

drowsy grail
#

Do you have a payment intent ID or charge ID for this transaction ?

uncut zealot
#

No, I don't have

#

How to get these Id?

drowsy grail
#

You can visit your Dashboard -> payments

uncut zealot
#

Can we use only source Id and token Id to get the money in Stripe?

drowsy grail
#

Which Stripe-angular library do you use?

uncut zealot
#

I use like this.

drowsy grail