PayPal¶
PayPal is an online payment provider available worldwide. openAPPone connects to PayPal through PayPal Checkout: customers pay with the PayPal button in the checkout, a PayPal window opens, and the payment is confirmed in openAPPone right away.
Bemerkung
While PayPal is available in over 200 countries/regions, only a selection of currencies are supported. PayPal is only offered for orders in a supported currency.
Settings in PayPal¶
openAPPone needs a REST API app from your PayPal business account. The app provides the Client ID and the Client Secret.
Log into the PayPal Developer Dashboard with your PayPal business account.
Choose Live for real payments, or Sandbox for tests (see Test PayPal with a Sandbox account).
Go to and click Create App. Enter a name, keep the type Merchant, and click Create App.
Copy the Client ID and the Secret.
Wichtig
Live and Sandbox apps have different credentials. Use the Sandbox credentials only together with the Test Mode state in openAPPone.
Settings in openAPPone¶
In the Credentials tab, fill in:
Email: the email address of your PayPal business account.
Client ID and Client Secret: the values copied from the PayPal app.
Click Generate your webhook. openAPPone registers its webhook at PayPal and fills in the Webhook ID.
Set the State field to Enabled (or Test Mode for Sandbox credentials).
If you use several websites, the Website field appears next to the State. Select the website on which PayPal is offered, or leave it empty to offer PayPal on all websites.
Click Publish so that visitors of the online shop can see PayPal.
Wichtig
The webhook can only be generated if openAPPone is reachable over HTTPS with a public domain. Without the webhook, payments still work, but openAPPone is not informed about payments that are completed or reversed after the customer has left the payment window.
Payment flow¶
In the checkout, the customer selects PayPal and clicks the PayPal button.
openAPPone creates the order at PayPal, and a PayPal window opens.
The customer logs in and approves the payment.
openAPPone collects the money immediately and confirms the payment. The transaction is set to Confirmed, and the sales order is confirmed.
If the customer closes the PayPal window without paying, the transaction is cancelled.
Unfinished payments¶
Sometimes a payment is approved in PayPal but never collected, for example when the customer’s connection breaks. openAPPone checks such transactions automatically every hour:
If a transaction is still Draft or Pending after 3 hours, openAPPone asks PayPal for the status of the order.
If PayPal reports the payment as completed, openAPPone confirms the transaction.
Otherwise, openAPPone cancels the transaction and notes the reason on it. The money is never collected automatically in this case.
If PayPal collects the money after the cancellation, the webhook reactivates the transaction and confirms it.
Test PayPal with a Sandbox account¶
In the PayPal Developer Dashboard, switch to Sandbox and create an app as described above.
Under , PayPal provides a sandbox business account (the merchant) and a sandbox personal account (the buyer).
In openAPPone, enter the email of the sandbox business account and the sandbox Client ID and Client Secret, and set the State to Test Mode.
Pay an order in the shop and log in to PayPal with the sandbox personal account.
Siehe auch