Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const stripe = window['Stripe'](this.configuration.api_key, {
- stripeAccount: this.configuration.stripeAccount
- });
- return stripe.retrievePaymentIntent(secret)
- .then(result => {
- console.log(`Found payment intent with status ${result.paymentIntent.status}`);
- return stripe.handleCardAction(secret);
- })
- .then(({ paymentIntent, error }) => {
- return new Promise<TransactionVendorReference>((resolve, reject) => {
- if (error) {
- reject(error);
- return;
- }
- const reference: TransactionVendorReference = {
- vendor: this.configuration.vendor,
- object: paymentIntent.object,
- id: paymentIntent.id
- };
- resolve(reference);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement