SHARE
TWEET

Untitled

a guest Jul 18th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.updateSellerAccountVerification = functions.https.onCall(async (data, context) => {
  2.  
  3.     const accountId = data.accountId;
  4.     const lastFourOfSocial = data.lastFourSocial;
  5.     const firstName = data.firstName;
  6.     const lastName = data.lastName;
  7.     const dateOfBirthDay = data.dateOfBirthInDays;
  8.     const dateOfBirthMonth = data.dateOfBirthInMonth;
  9.     const dateOfBirthYear = data.dateOfBirthYear;
  10.  
  11.  
  12.      return stripe.accounts.update(
  13.  
  14.         accountId,
  15.        
  16.         {
  17.             individual: { first_name: firstName,
  18.                           last_name: lastName,
  19.                           ssn_last_4: lastFourOfSocial
  20.             },
  21.             dob: {
  22.                 day: dateOfBirthDay,
  23.                 month: dateOfBirthMonth,
  24.                 year: dateOfBirthYear
  25.               }
  26.         }
  27.        
  28.       ).then((key) => {
  29.         return key
  30.     }).catch((err) => {
  31.         console.log(err)
  32.         throw new functions.https.HttpsError('internal', 'Unable to create ephemeral key')
  33.     });
  34.  
  35. })
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top