SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 87 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.  
  5.         return stripe.retrievePaymentIntent(secret)
  6.             .then(result => {
  7.                 console.log(`Found payment intent with status ${result.paymentIntent.status}`);
  8.                 return stripe.handleCardAction(secret);
  9.             })
  10.             .then(({ paymentIntent, error }) => {
  11.                 return new Promise<TransactionVendorReference>((resolve, reject) => {
  12.                     if (error) {
  13.                         reject(error);
  14.                         return;
  15.                     }
  16.  
  17.                     const reference: TransactionVendorReference = {
  18.                         vendor: this.configuration.vendor,
  19.                         object: paymentIntent.object,
  20.                         id: paymentIntent.id
  21.                     };
  22.                     resolve(reference);
  23.                 });
  24.             });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top