Testing Digital Wallet Payments - via Web SDK
Make sure you are using Web SDK Version 0.0.18 (or higher).
Decline scenarios for wallet payments cannot be tested in the sandbox environment.
Testing Card payments for your Digital Wallet payments via Judopay's Web SDK integration:
From the Web SDK integration guide:
- Add the Payment Form to your Website To hide the payment form iFrame, use: <div id="payment-iframe" style="position:absolute;width:0;height:0;border:0;"></div>
The payment form iFrame must be loaded onto the page in order for payments to work. However displaying the form to the consumer is not required for this transaction type.
Direct from Judopay:
- Judopay JudoId
- A valid apple-developer-merchantid-domain-association
From the Merchant:
- Domain(s) being used for Apple Pay™
- These are the domain(s) where the Apple Pay™ button will be displayed, for example the checkout page.
These must be SSL enabled domains, Apple will not allow non-encrypted domains to be used.
- Account(s) being used for Apple Pay™
For a successful end-to-end wallet payment testing journey, it is recommended to:
- Perform wallet test scenarios in a production environment
- Use live cards to process test payments and preAuths.
From the Web SDK integration guide:
- Add the Payment Form to your Website To hide the payment form iFrame, use: <div id="payment-iframe" style="position:absolute;width:0;height:0;border:0;"></div>
The payment form iFrame must be loaded onto the page in order for payments to work. However displaying the form to the consumer is not required for this transaction type.
Direct from Judopay:
- Judopay Account (sandbox and eventually live)
- Judopay JudoId
Merchant Requirement (Google Requirement): Prior to going live with Google Pay™ Web Payments, you must have a valid Google verified Live Merchant ID.
To receive your Live Merchant ID:
- Follow Google Pay™'s Integration Checklist, to ensure you have completed all the required steps in your integration.
To add your test card suite to your Digital Wallet to process test payments and preAuths, register your Google Pay Wallet.
- Details for the cards in your test card suite are hard coded into the test wallet, therefore some negative scenarios cannot be simulated, due to limitations to Google Pay™s test environment. For example you cannot simulate an incorrect cv2, or insufficient funds.
- You will only receive a success response.
- No charge will be made on the test cards.
The digital wallet payment flow provides consumers with an extra layer of security, encrypting and decrypting the card details sent in the payload by replacing the consumer's card details with a device token, or dynamic security code.
Suggested Test Scenario | Expected Outcome |
---|---|
Process an Apple Pay™ Wallet payment. | 200 Successful |
Process an Apple Pay™ Wallet preAuth. | 200 Successful |
Process a Google Pay™ Wallet payment. | 200 Successful |
Process a Google Pay™ Wallet preAuth. | 200 Successful |
For more information on API credentials and permissions, see Permissions.
paymentRequestApplePay
paymentRequestGooglePay
Once the authorisation is complete you will receive either:
- A JSON object response (a Judopay receipt object). Example in the code snippet above.
- An error object
The consumer should be redirected to the outcome screen and the response/error should be handled accordingly. For example, if the result = SUCCESS redirect the consumer to the Success Page, else ERROR.
For more information on the response codes, see Codes.
Decline scenarios for wallet payments cannot be tested in the sandbox environment.
- How your app handles negative flows
- Your customer's experience should a negative flow occur:
- Logic to communicate error messages
- Customise how your app responds
- How to maintain application consistency
Limited test coverage is possible in the sandbox environment. The suggested negative test scenarios refer to model and processing error codes and information on why the transaction request failed Judopay's validation checks, which are similar to card payment scenarios.
Suggested Negative Test Scenario | Expected Error Code | Error Description |
---|---|---|
Attempt to perform a wallet payment / preAuth request with the Incorrect currency entered for the specified transaction. Default currency = GBP | 72 | Sorry, we're currently unable to route this transaction. Please check your account details and try again. If this issue persists, please contact customer services. This is a processing error. |
Attempt to perform a wallet payment / preAuth request with the incorrect environment (live or sandbox) for your API Token and API Secret and configuration. | 7 | Sorry, we were unable to authorize this request. Please check your details and permissions before trying again. |
For more information on error responses returned, see Web SDK Error Responses.
Using the response information from a successful wallet payment test transaction, you can test the following scenarios:
Directly call the Transaction API to make a: