I am trying to find a way to determine if a nonce is for a credit card payment or for Google Pay/Apple Pay(IE from a digital wallet). Is there a way to tell from the nonce or from the tenders returned by the charge call?
Hi @hal-h welcome to the forums!
In the cardNonceResponseReceived callback, the
cardData will have a
digital_wallet_type enum present so you can see if it matches a digital wallet (or
NONE). Please let me know if you have any additional questions or concerns, I’m happy to help!
Thank you for your reply. I am calling Square through the V1 TransactionsAPI.charge( ) method (This is in the square_connect gem) using a nonce. We have upgrading to V2 and the payments/order API in our dev plan but are not there yet. Is there a way to identify if the nonce came from a digital wallet or not?
What I provided above is for the Square Payment Form, before you hit Charge or CreatePayment, so it should still work. I don’t think this information is revealed in the Transactions or Payments API at this time.