With the new verifyBuyer() requirements, how does one create a customer, save a nonce as a card, get a card-id returned and then make the payment with that card-id? The workflow from the prior paymentForm method was:
Frontend
- Get a nonce
- Pass it to the backend
Backend
- Receive a nonce
- Create the customer if does not exist
- Use the nonce to save the card to the customer
- Use the new card-id to make the payment
Unfortunately, with the introduction of verifyBuyer() and the different 'Intents" of the verificationData I can’t see how to create a customer and save the card without multiple calls to verifyBuyer(). Once to save the card and again to make the payment . This is awkward at best given that one may be managing a payment from a selection of several card-ids and/or a new card that is to be saved.
It would take several ajax calls to the server to create the customer, create a card, and then use that new card-id for the payment. In addition, it would take 2 separate verifyBuyer() calls. Customers will become annoyed with the multiple verifications and web-site conversions will tank.
Can you provide a workflow on how this is to be done?