活跃商家 ogone =>商户不活跃
我正在尝试在 Rails 开发应用程序中实现一个 ogone 测试帐户,但我不断收到错误消息“商家未激活”
经过一番调查,我认为这与 SHA 编码有关?
问题是我不太明白这是如何工作的,Ogone 有多个 SHA 参数需要填写,而且我还没有在 activemerchant 中找到将其放入其中的方法。
有这方面经验的人吗?
I'm trying to implement a ogone test account in my rails development application, but I keep getting the error message 'Merchant not active'
After some investigation I believe it has something to do with the SHA encoding?
Problem is I don't really get how this works, Ogone has multple SHA parameters to fill out and I haven't found a way in activemerchant to put it in there.
Someone with some experience in this matter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要使用 2010 年 5 月 10 日之后创建的帐户使用 Ogone Direct Link,您将需要此补丁:https: //github.com/Shopify/active_merchant/pull/85
(这也适用于在此日期之前创建的帐户。)
这还将为您提供有关别名使用的更多详细信息,修复 Ogone 的新更新的一些问题,...请务必阅读 ogone 网关代码中的内联文档:< a href="https://github.com/ZenCocoon/active_merchant/blob/master/lib/active_merchant/billing/gateways/ogone.rb" rel="nofollow">https://github.com/ZenCocoon/active_merchant/ blob/master/lib/active_merchant/billing/gateways/ogone.rb
截至今天,SHA1 已受支持并可使用。
to work with Ogone Direct Link with an account created after Mai 10, 2010 you will need this patches : https://github.com/Shopify/active_merchant/pull/85
(This also works with accounts created before this date.)
This will also give you more details on the aliases usage, fix some issues with new updates from Ogone, ... make sure to read the inline doc within the ogone gateway code : https://github.com/ZenCocoon/active_merchant/blob/master/lib/active_merchant/billing/gateways/ogone.rb
As of today, the SHA1 is supported and to be used.
您收到
商家未激活
错误的原因是您的帐户未配置为能够使用 Direct Link 或其他几个选项。要激活此功能,您应该获得更高的订阅或联系他们的支持人员并要求他们为您激活它。对于 SHA,您需要配置一个秘密密码,用于分隔要发送的参数。例如:
最终您将帖子变量哈希为 SHA-1 并将该密钥添加到您的帖子参数中,这样
您就可以保护您的数据并确保没有人可以篡改这些变量。
还要确保当您收到 Ogone 的响应时,您使用他们发送给您的参数重新形成 SHA 哈希值,然后将此自己形成的 SHA 哈希值与 Ogone 发送给您的哈希值进行比较。如果这两者匹配,则可以确定参数没有被弄乱。
希望这对您或遇到此问题的其他人有所帮助。
The reason you are getting the
Merchant not active
error is because your account is not configured to be able to use Direct Link or several other options. To activate this you should get a higher subscription or contact their support and ask them to activate it for you.As for SHA, you need to configure a secret passphrase by which you separate the parameters you're sending. For instance:
Eventually you Hash your post variables to SHA-1 and add that key to your post parameters as
This way you secure your data and make sure nobody can tamper with those variables.
Also make sure that when you get a response from Ogone you re-form a SHA hash using the parameters they've send you and you then compare this own-formed SHA hash with the one sent to you by Ogone. If these two match you can be sure that the parameters have not been messed with.
Hope this helps you or others who come across this question.