This repository represents a sample merchant server for a merchant integrating with the PayPal iOS-SDK and PayPal Android-SDK. This repository uses sample PayPal merchant staging credentials to create PayPal orderIDs and universal access tokens, and to capture orders.
Note: The PayPal iOS SDK and Android SDK are both still in development and not meant for public consumption.
To build and run locally, use the command: ./mvnw spring-boot:run -Dspring-boot.run.profiles=local
. Running this command will install Maven and all necessary dependencies.
If everything worked, you should be able to hit http://localhost:5000/id-token?countryCode=US
.
To change the merchant account used on this server, update the credentials in application-local.properties
.
After making this change, execute both the build and run steps in the Build and run locally section above.
The app is currently deployed to Heroku at this url: https://ppcp-sample-merchant-sand.herokuapp.com.
To deploy to sandbox, first add a git remote called sandbox:
git remote add sandbox https://git.heroku.com/ppcp-sample-merchant-sand.git
Pushing your changes to this remote will automatically deploy them:
git push sandbox master
To deploy to production, first add a git remote called heroku:
git remote add heroku https://git.heroku.com/ppcp-sample-merchant-prod.git
Pushing your changes to this remote will automatically deploy them:
git push heroku master
The PP merchant account we are using to generate an orderID
has a high account balance which results in limitations on our ability to use this endpoint. Follow these steps to temporarily lift restrictions on the current merchant account.
- Log into admin.msmaster.qa.paypal.com with the username
concordia_admin
and password1111111
. - Search on the email
[email protected]
. It will take a while. - On the red banner where it says "Limited - High", click "View Limitations" and wait a bit.
- Find and click the "Edit Limitations" button.
- In the banner that says "Current Limitations", click the link in the white text that says "Remove Limitations".
- Check all of the checkboxes. You must enter a memo.