PayPal

Paypal is an American online payment provider available worldwide, and one of the few that does not charge a subscription fee.

注解

While PayPal is available in over 200 countries/regions, only a selection of currencies are supported.

Settings in PayPal

To access your PayPal account settings, log into PayPal, open the Account Settings, and open the Website payments menu.

PayPal account menu

重要

Note that for PayPal to work in Odoo, the options Auto Return, PDT, and IPN must all be enabled.

自动返回

The Auto Return feature automatically redirects customers to Odoo once the payment is processed.

From Website payments, go to Website preferences ‣ Update ‣ Auto return for website payments ‣ Auto return and select On. Enter the address of your Odoo database (e.g., https://yourcompany.odoo.com) in the Return URL field, and Save.

注解

Any URL does the job. Odoo only needs the setting to be enabled since it uses another URL.

支付数据传输(PDT)

PDT allows to receive payment confirmations, displays the payment status to the customers, and verifies the authenticity of the payments. From Website preferences ‣ Update, scroll down to Payment data transfer and select On.

小技巧

PayPal displays your PDT Identity Token as soon as Auto return and Payment Data Transfer (PDT) are enabled. If you need the PDT Identity Token, disable and re-enable Payment data transfer to display the token again.

即时付款通知(IPN)

IPN is similar to PDT, but allows for more notifications, such as chargeback notifications. To enable IPN, go to Website payments ‣ Instant payment notifications ‣ Update and click Choose IPN settings. Enter a Notification URL, select Receive IPN messages (Enabled), and Save.

PayPal Account Optional

我们建议在付款时不要提示客户使用 PayPal 账户登录。客户使用借记卡/信用卡付款会更好、更方便。要禁用该提示,请进入:menuselection:账户设置-->网站支付-->更新,并在:guilabel:PayPal 账户可选项`中选择:guilabel:`开启

支付信息格式

如果您在客户名称或地址中使用重音字符(或主要拉丁字符以外的其他字符),则**必须**配置由 Odoo 发送至 PayPal 的付款请求的编码格式。否则,部分交易会因无通知而失败。

To do so, go to your production account. Then, click More Options and set the two default encoding formats as UTF-8.

小技巧

在Odoo上设置

授权认证

Odoo needs your API Credentials to connect with your PayPal account. To do so, go to Accounting ‣ Configuration ‣ Payment Providers and Activate PayPal. Then, enter your PayPal account credentials in the Credentials tab:

  • Email: the login email address in Paypal;

  • PDT Identity Token: the key used to verify the authenticity of transactions;

  • Use IPN: enable for PayPal to work properly in Odoo.

小技巧

Save the PDT Identity Token for later use.

To set the PDT Identity Token, switch to developer mode and retrieve the token by following the configuration steps at 支付数据传输(PDT).

注解

The PayPal Merchant ID is not required in Odoo.

重要

If you are trying PayPal as a test, using a PayPal Sandbox account, change the State to Test Mode. We recommend doing this on a test Odoo database rather than on your main database.

Extra fees

You can charge extra fees to customers choosing to pay with PayPal in order to cover the transaction fees PayPal charges you.

注解

测试环境

配置

Thanks to PayPal sandbox accounts, you can test the entire payment flow in Odoo.

Log into the Paypal Developer Site using your PayPal credentials, which creates two sandbox accounts:

Log into PayPal sandbox using the merchant account and follow the same configuration instructions. Enter your sandbox credentials in Odoo (Accounting ‣ Configuration ‣ Payment Providers ‣ PayPal in the Credentials tab, and make sure the status is set on Test Mode. We recommend doing this on a test Odoo database rather than your main database.

用沙盒个人账号从Odoo中运行一笔测试交易。

参见