Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         const stripe = window['Stripe'](this.configuration.api_key, {
  2.             stripeAccount: this.configuration.stripeAccount
  3.         });
  4.         return stripe
  5.                .handleCardAction(secret)
  6.                .then(({ paymentIntent, error }) => {
  7.                    return new Promise<TransactionVendorReference>((resolve, reject) => {
  8.                        if (error) {
  9.                            reject(error);
  10.                            return;
  11.                        }
  12.  
  13.                        const reference: TransactionVendorReference = {
  14.                            vendor: this.configuration.vendor,
  15.                            object: paymentIntent.object,
  16.                            id: paymentIntent.id
  17.                        };
  18.                        resolve(reference);
  19.                    });
  20.                });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement