Your app can process a one-time payment using PayPal. By entering the details for an app registered with PayPal and using the dedicated Action on iOS or Android, you can accept a payment from the app user.
If you haven’t already done so, log into your PayPal account developer dashboard and create an app – you will need to enter the Client ID for it in Dropsource. In the REST API apps section, click Create app.
Enter the details for your new app and copy the Client ID so that you can paste it into Dropsource.
In your Dropsource project, click Edit next to PayPal in Settings on the left of the editor. Enter your Client ID and choose an environment (e.g. Production for your live app, or Sandbox for testing).
Decide when you want to process the payment and open the relevant Event, for example to process it when the user taps a Button, select the Button and in Properties > Events, choose the Tapped Event.
Add the Accept Payment Using PayPal (iOS) / Obtain Immediate PayPal Payment (Android) Action. Enter the amount you are charging as a Double value, a currency code, and a short text description of what the charge is for.
When the Action runs, the user will be directed to PayPal’s payment processing component, returning to your page when payment is complete or failed. In the nested Events, add Actions to respond to failure or success of the payment, for example navigating to another page on success or displaying an error message on failure.
The details you enter for the PayPal payment processing Action can be input statically or can be pulled from the available input sources in your app, including API response data. By handling the nested fail and success Events, you can tailor your app’s behavior dynamically to the user’s payment status.