Using Sandbox accounts when testing

The sandbox environment behaves similarly to the production environment. However, please consider the following caveats when testing the PayPal Here SDK in the sandbox environment:

  1. The software update process for the EMV readers is not available in the sandbox. You will need to connect to a production environment in order to do any of the software updates on the EMV readers. Once the reader has been updated completely, in the production environment, then it's able to be used in the sandbox to accept payments.
  2. Please only use merchant accounts that are created through the Developer Site. While you can create accounts during the Permissions and/or Signup flows, those accounts will not have the right verifications to be able to be used for PayPal Here processing right away. Since it was not created from within your developer account, you won't get the notifications necessary for the extra settings, and therefore it would need some manual intervention on PayPal's end to get the account set up.

PayPal Here SDK and the Sandbox

The Github repo for the SDK should contain a sample app for each available platform. Each sample app will use an instance of our mid-tier sample server and should be runnable out of the box. All you should need to do, is load up the sample app and change the server URL to point to 'sandbox' instead of 'live'. Below are the simplest instructions to get going with the sample apps for iOS and Android.

Note: If you are integrating with the EMV reader, you'll want to be sure to pair it, via bluetooth, to your device prior to running the sample apps.

iOS

The sample app for iOS is called the TakePayment app and can be found here. Once you load this app into Xcode, you'll want to go into the LoginViewController.m file and change the following line within the loginWithPayPal function:

NSURL *url = [NSURL URLWithString:@"http://pph-retail-sdk-sample.herokuapp.com/toPayPal/live"];

As you can see, that is currently set to Live and so you'll want to change it to sandbox as such:

NSURL *url = [NSURL URLWithString:@"http://pph-retail-sdk-sample.herokuapp.com/toPayPal/sandbox"];

Now, when you run the app and press the Login button, you'll be sent through the permissions flow portion of the merchant onboarding flow which will allow you to grant permission to the sample app to process on your behalf. When you are asked to login, you'll use the email and password of your previously created sandbox account.

Since this is using the sample server, it will return a composite token which will be digested into the SDK via the initializeSDKMerchantWithToken function.

Android

The sample app for Android is called the HereSDKSampleApp and can be found here. Once you load this app into Android Studio, and run it, you'll simply select Sandbox as the environment on the first screen.

After you select the environment and click Login, go through the permissions flow of the merchant onboarding flow to grant permission to the sample app to process on your behalf.

Since this is using the sample server, it will return a composite token which will be digested into the SDK via the startPaymentOptionsActivity function.