Test in the sandbox
Last updated: Sept 19th, 7:19pm
The sandbox environment behaves similarly to the production environment. However, follow these guidelines when testing the PayPal Here SDK in the sandbox environment:
- Only use merchant accounts that are created through the Developer Dashboard.
- PayPal does not provide test payment cards. If you need a card number for testing, this process is outlined here.
PayPal Here SDK and the sandbox
The GitHub repo for the SDK contains a sample app for each available platform. Each sample app will use an instance of our sample server. To run it:
- Load up the sample app.
- Change the environment to point to
sandbox
instead ofLive
.
Below are instructions to get started with the sample apps for iOS, Android, and Web.
iOS
The sample app for iOS can be found on our GitHub. To use it:
- Load the app into Xcode and run it.
- Make sure the environment selector at the top is set to sandbox before you click Initialize Merchant.
- Set up developer permissions, which enables you to grant permission to the sample app to process on your behalf.
- When you are asked to log in, use the email and password you set when you created your sandbox account.
- Because this example uses the sample server, we've appended
?returnTokenOnQueryString=true
to the URL so it returns the raw values to initialize theSdkCredential
class instead of returning the default composite token.
Android
Find the sample app for Android on our GitHub. To use it:
- Load the app into Android Studio and run it.
- Make sure the environment selector at the top is set to sandbox prior to clicking
Initialize Merchant
. - Set up developer permissions, which will allow you to grant permission to the sample app to process on your behalf.
- When you are asked to log in, use the email and password that you set when you create your sandbox account.
- Because this example uses the sample server, we've appended
?returnTokenOnQueryString=true
to the URL so returns the raw values to initialize theSdkCredential
class instead of returning the default composite token.
Web
The sample code for Web can be found here.