Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  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. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement