How to make a payment with VNPay¶
VNPay is an online payment gateway that connects businesses to banks. Once you connect it to Viindoo, your customers can pay a sales order or an invoice with a QR code, an ATM card or an international card, and Viindoo records the transaction and the payment by itself.
This guide is for administrators who set VNPay up and for accountants who follow the payments. VNPay accepts Vietnamese dong (VND) only, for customers in Vietnam.
Requirements
This tutorial requires the installation of the following applications/modules:
You also need a merchant account with VNPay: it gives you the Website Code and the Hash Secret that Viindoo asks for.
Who can do this, and where?¶
Task |
Role needed |
Application |
|---|---|---|
Set up the provider VNPay |
Administration: Settings |
Accounting |
Pay an order or an invoice |
Customer |
Customer portal or website |
How do I set up VNPay?¶
Go to Apps, remove the filter Apps and search for VNPay. The module VNPay Payment Acquirer must be installed. Install the module if it is not.
Go to Accounting ‣ Configuration ‣ Online Payments ‣ Payment Providers. The provider VNPay is on the list, Disabled until you set it up. Click its card.
In the tab Credentials, enter the information VNPay gave you:
VNPay Website Code: the website code of your merchant account;
VNPay Hash Secret: the hash secret of your merchant account.
Then choose the State:
Test Mode to try the payment with the test environment of VNPay. Only your internal users see VNPay at the checkout, unless you publish it, and no real money moves;
Enabled for real payments. VNPay is then published, so your customers see it.
The values in the picture are samples. The link How to configure your VNPay account? opens the guide of VNPay.
Open the tab Configuration to check what VNPay offers: the currency is VND and the country is Vietnam. Choose the Payment Journal that receives the payments, then click Save.
How does a customer pay with VNPay?¶
Note
This part needs a live VNPay merchant account, so it has no screenshot: the payment pages belong to VNPay, and no credential or real payment is used for this article.
The customer opens the sales order or the invoice from the link in your email, the customer portal or your website, and clicks Pay Now.
The customer chooses VNPay. Viindoo sends the customer to the payment page of VNPay.
On that page, the customer picks the payment method, a QR code, an ATM card or an international card, and confirms the payment.
VNPay returns the customer to Viindoo. When the payment succeeds, the transaction is Done and the payment is recorded on the order or the invoice.
If VNPay’s confirmation does not reach Viindoo, Viindoo asks VNPay for the result of the pending transactions every 5 minutes.
What should I see afterwards?¶
The chatter of the sales order and of the invoice shows the payment transaction.
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 VNPay 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. |
VNPay is not offered for an order. |
VNPay works in VND for customers in Vietnam only. |
Issue the order in VND, or offer another provider. |
The form asks for the website code and the hash secret. |
Both are required as soon as the state is not Disabled. |
Enter the values of your VNPay merchant account. |
Next steps¶
See also
Related article
Optional module