Skip to main content

Testing Apple Pay Integration

Testing Apple Pay Integration

After completing the integration, it is crucial to thoroughly test the Apple Pay functionality in a sandbox environment.

Testing in Sandbox

  • Test with Sandbox Accounts: Use test Apple Pay accounts and test cards provided by Apple to simulate transactions. These accounts are specifically designed for testing purposes.

  • Simulate Various Scenarios: Test different scenarios including successful payments, payment failures, and cancellations to ensure your integration handles each case correctly.

note

If you don’t already have a test or sandbox account for Apple Pay, you need to obtain one through your Apple Developer Account. Please note, DNA does not provide test accounts for Apple Pay, so ensure you complete these steps via Apple.

Troubleshooting Payment Failures

  • Check Sandbox Configuration: If a payment fails during testing, double-check that your account is in sandbox mode and that you are using the correct sandbox credentials.

  • Review Error Messages: Pay close attention to any error messages returned during the transaction. These can provide insights into what might be causing the issue, whether it's a configuration error or something else.

Common Issues and Troubleshooting

  • Button Not Displaying: Ensure the script is correctly loaded and that the user is on a compatible device and browser.
  • Payment Errors: Review the logs for specific error codes and messages. Make sure all necessary fields are provided and correctly configured in your payment data.

By following these steps, you can ensure a robust and reliable Apple Pay integration before moving to production.