On this article, we have talked about how can you integrate PayPal for your single issue sales on your Web App. You may be wondering how can you test this before it really goes live. No need to worry, we've got you covered! Here's how you can test your PayPal connection using Sandbox.
As mentioned on this article, you will need to get your MagLoft subscription upgraded to at least Professional Plan and a PayPal Business Account is also required.
PayPal Developer Account:
Navigate to your PayPal Developer dashboard. As a start, click on the Sandbox menu on your left hand side and find the Account menu. By default, when you sign up for a PayPal Developer account, you will get two email addresses which are email@example.com and firstname.lastname@example.org We advise to use these two emails, email@example.com as the seller and firstname.lastname@example.org as the buyer for you to test
Now, scroll back up to My Apps and Credentials, find the REST API apps and simply click on the Create App button
You will be required to fill out your app name, and just for the sake of simplicity, we'll create a new app for this testing. Remember to choose your email@example.com as the Sandbox Developer Account. When all are set, click on Create App
After an app is created, you will see a new bundle of Client ID and Secret Code Make sure that you are on the Sandbox environment instead of Live. You can simply copy and paste these codes to your MagLoft Account.
Once all keys are in place, go ahead and click Connect Account. Please bear in mind that these keys are for the sake of demos only and they are not real keys used in MagLoft Web App. You are also advised to not share any of your keys with someone you don't trust 100% to your PayPal account.
Now, go to your Web App (you may need to refresh the web app first to see the changes), and you should be able to see the PayPal Checkout when you click on one of the paid issues.
When you click on the PayPal Checkout, you are required to log in and you can use the Buyer email address available on your Sandbox Accounts. You can also see the Sandbox environment as the web address for this testing.
You can then pay with your PayPal available balance and click on Pay Now
If the purchase is successful, you will see the play button on the issue that you have purchased and you will have access to read it.
You can also access the https://sandbox.paypal.com/ and log in using your Seller email from your Sandbox Accounts to see the transactions of the email buyers.
When all are good, please remember to disconnect your Sandbox from your PayPal Account in the MagLoft portal and put the real app keys back for your Live App.