How to make a payment with PayPal¶
PayPal is an online payment service used all over the world. Once you connect it to Viindoo, your customers can pay an invoice or a sales order with their PayPal account and Viindoo records the transaction and the payment by itself.
This guide is for administrators who set PayPal up and for accountants who follow the payments. PayPal does not accept Vietnamese dong (VND): the module Paypal - Enhanced Currency Support converts the amount to a currency PayPal accepts.
Requirements
This tutorial requires the installation of the following applications/modules:
Payment Provider: Paypal
Paypal - Enhanced Currency Support, when you sell in a currency PayPal does not accept
You also need a business account with PayPal and an app of the PayPal developer dashboard: it gives you the Client ID and the Client Secret that Viindoo asks for. For tests, use a PayPal sandbox account.
Who can do this, and where?¶
Task |
Role needed |
Application |
|---|---|---|
Set up the provider PayPal |
Administration: Settings |
Accounting |
Pay an order or an invoice |
Customer |
Customer portal |
How do I set up PayPal?¶
Go to Apps, remove the filter Apps and search for paypal. The modules Payment Provider: Paypal and Paypal - Enhanced Currency Support must be installed. Install the modules if they are not.
Go to Accounting ‣ Configuration ‣ Online Payments ‣ Payment Providers and click Activate on the card PayPal. Choose the State:
Test Mode to use the sandbox of PayPal: no real money moves, and only your internal users see PayPal at the checkout unless you publish it;
Enabled for real payments. PayPal is then published, so your customers see it.
In the tab Credentials, enter:
Email: the business email of your PayPal account. It is proposed from the email of your company;
Client ID and Client Secret: those of the app you created for your PayPal account in the PayPal developer dashboard;
Webhook ID: lets PayPal tell Viindoo about each payment, so the transaction is updated by itself. Click Generate your webhook to create it.
The values in the picture are samples. The webhook needs a Viindoo system reachable through a public HTTPS address: on a local test system the button answers You must have an HTTPS connection to generate a webhook.
Open the tab Configuration. The field Default Converted Currency holds the currency PayPal charges when the currency of the payment is not accepted, USD by default. Choose the Payment Journal that receives the payments, then click Save.
How does Viindoo convert the amount?¶
With the module Paypal - Enhanced Currency Support, a payment in VND is charged in the Default Converted Currency at the exchange rate of the system. The exchange difference is recorded in the journal Currency Conversion Difference. Keep the exchange rates of the currencies up to date, see How to configure a multi-currencies system.
How does a customer pay with PayPal?¶
Note
This part needs a live PayPal account, so it has no screenshot: the payment pages belong to PayPal, and no credential or real payment is used for this article.
The customer opens the invoice or the sales order from the link in your email or the customer portal and clicks Pay Now.
The customer chooses PayPal. Viindoo sends the customer to PayPal, where the customer signs in and confirms the payment.
PayPal returns the customer to Viindoo. When the payment succeeds, the transaction is Done and the payment is recorded on the invoice or the order.
What should I see afterwards?¶
In developer mode, Accounting ‣ Configuration ‣ Online Payments ‣ Payment Transactions lists every transaction with its reference and its state.
Common problems¶
Problem |
Cause |
What to do |
|---|---|---|
Customers do not see PayPal at the checkout. |
The provider is Disabled, or it is in Test Mode and not published. |
Set the state to Enabled, or click the button Unpublished at the top of the provider to publish it. |
PayPal is not offered for an order in VND. |
The module Paypal - Enhanced Currency Support is not installed. |
Install the module and check the Default Converted Currency. |
The form asks for the email, the client ID and the client secret. |
They are required as soon as the state is not Disabled. |
Enter the values of your PayPal account. |
The button Generate your webhook answers that you need an HTTPS connection. |
Your Viindoo system is not reachable through a public HTTPS address. |
Publish the system on HTTPS, then click the button again. |