Ogone

Ogone,也称为**Ingenico支付服务**,是一家法国公司,提供安全电子交易所涉及的技术。

在Ogone中进行设置

创建API用户

登录您的Ogone账户,转到:guilabel:`配置`选项卡。

您需要创建**API用户**,用于在Odoo创建交易。虽然您可以通过主账户执行此操作,但**API用户**可以确保如果在Odoo中使用的凭证泄漏,则无法访问Ogone配置。此外,与普通用户不同,**API用户**的密码无需定期更新。

要创建**API用户**,转到:menuselection:配置-->用户,点击:guilabel:新用户。须配置以下字段:

  • 用户ID:可以自主选择。

  • 用户姓名、电子邮箱地址和时区:自主输入信息。

  • 简介:应设置为:guilabel:管理员

  • API专属用户:应勾选。

用户创建完成后,您需要生成密码。保存密码和**用户ID**,以供之后设置使用。

小技巧

如果您已经设置了用户,请确保用户被激活,且无错误。如果尚未激活,请点击:guilabel:`激活(错误)`按钮,以重置用户。

为Odoo设置Ogone

Ogone must now be configured to accept payments from Odoo. Head to Configuration ‣ Technical Information ‣ Global Security Parameters, select SHA-1 as Hash Algorithm and UTF-8 as character encoding. Then, go to the Data and Origin verification tab of the same page and leave the URL field of the e-Commerce and Alias Gateway section blank.

小技巧

If you need to use another algorithm, such as sha-256 or sha-512, within Odoo, activate the developer mode and go to General Settings ‣ Technical ‣ System Parameters. From here, search for payment_ogone.hash_function and change the value line to the desired algorithm (sha-256 or sha-512).

您需要生成**SHA-IN**密码。**SHA-IN**和**SHA-OUT**密码用于在Odoo与Ogone间的交易请求和响应中进行数字签名。通过使用上述密码和`sha-1`算法,两个平台可以确保从对方接收到的信息未经更改或篡改。

在:guilabel:`检查电子商务和别名网关`和:guilabel:`检查DirectLink和指(自动)`中输入相同的**SHA-IN**密码。IP地址字段可以留空。

您的**SHA-IN**和**SHA-OUT**密码不应相同,长度为16~32个字符。确保在Ogone配置过程中使用相同的**SHA-IN**和**SHA-OUT**密码,因为Odoo只允许使用一个**SHA-IN**和一个**SHA-OUT**密码。

要检索**SHA-OUT**密钥,请登录Ogone帐户,转到:menuselection:配置-->技术信息-->交易反馈-->所有交易提交模式,然后,获取或生成**API密钥**和**客户端密钥**。复制API密钥时格外小心,因为如果不生成新密钥,之后将无法再次获取API密钥。

完成后,转到:menuselection:配置-->技术信息-->交易反馈,并勾选以下选项:

  • :guilabel:`HTTP redirection in the browser`的:guilabel:`URL`字段可以留空,因为Odoo会为各次交易请求指定URL。

  • I would like to receive transaction feedback parameters on the redirection URLs:应勾选。

  • Direct HTTP server-to-server request:应设置为`Online but switch to a deferred request when the online request fails`。

  • 2个**URL**字段应包含以下URL,<example>`由您的数据库取代:`https://<example>/payment/ogone/return

  • 动态电子商务参数`应包含以下值:`别名金额卡号CN币种IPNC错误订单ID已付款PM状态TRX日期。也可以包含其他参数(如果与Ogone的其他集成需要),但不建议包含。

  • 在:guilabel:All transaction submission modes`部分,填写**SHA-OUT**密码,并禁用`HTTP request for status change

要允许您的客户保存信用卡凭证,以供之后使用,转到:menuselection:配置-->别名-->我的别名信息,在该选项卡中,您可以配置用户如何保存信用卡详细信息、信息保存时间、是否显示保存信用卡信息复选框等。

在Odoo上设置

To set up Ogone in Odoo, head to Accounting ‣ Configuration ‣ Payment Acquirers and open the Ogone acquirer. In the Credentials tab, enter the PSPID of your Ogone account, and fill out the other fields as configured in your Ogone portal.

重要

If you wish to run tests with Ogone, within the accounting app, go to Configuration ‣ Payment Acquirers. Click on Ogone, enable Test Mode and enter your credentials in the Credentials tab. We recommend doing this on an Odoo test database, rather than on your main database.