【问题标题】:Magento - How can I pass UserId instead of OrderId to ADYEN SKINMagento - 如何将 UserId 而不是 OrderId 传递给 ADYEN SKIN
【发布时间】:2013-01-15 14:06:02
【问题描述】:

我正在使用 adyen 通过信用卡付款,我注意到当用户付款时,Magento 上的模块将订单 ID 作为 MerchantReference 传递给 Adyen。 为了在使用 adyen SKIN 付款期间激活“记住我的数据”,我需要传递 UserId 而不是 orderId。

有什么解决办法吗?

--- 更多信息 ---

这是具体的模块:http://www.magentocommerce.com/magento-connect/adyen-payment.html

而且,这是我们在另一个环境中为 Adyen 上的付款生成的表单示例。可以看到,merchantReference 是一个唯一值,它标识了第一个用户付款。该值是使用 UserId 计算的,因此我们可以识别用户进行下一次付款。

我应该知道插件 Adyen(用于 Magento)在哪里生成这个表单,所以我可以使用 UserId 而不是 OrderId 来更改 MercerReference 参数

<form action="https://test.adyen.com/hpp/pay.shtml" 
      method="post" id="gatewayPaymentForm">
      <input type="hidden" name="merchantReference" value="Ajx">
      <input type="hidden" name="paymentAmount" value="2900">
      <input type="hidden" name="currencyCode"  value="EUR">
      <input type="hidden" name="shipBeforeDate" value="2013-02-03">
      <input type="hidden" name="skinCode" value="XDFGG">
      <input type="hidden" name="merchantAccount" value="NameAccount">
      <input type="hidden" name="shopperLocale" value="es">
      <input type="hidden" name="sessionValidity" value="2013-01-31T16:35:31+01:00">
      <input type="hidden" name="merchantSig" value="bcbXNhsd">
      <input type="hidden" name="shopperEmail" value="asd@gmail.com">
      <input type="hidden" name="shopperReference" value="5">
      <input type="hidden" name="recurringContract" value="ONECLICK">
</form>

谢谢

【问题讨论】:

  • 这将有助于分享有关该特定模块的更多信息,因为几乎没有人会知道它。因此,您应该至少包含必要的代码,或者至少包含指向模块的链接。
  • 我刚刚更新了@mpaepper 要求的信息
  • 请记住,一个用户 ID 可以有多个订单,因此如果您将 MerchantReference 更改为用户 ID,则很难引用特定订单
  • 感谢您的评论@RS,我们只需要一个唯一的 ID,但我们不知道如何修改表单以显示具有该 UserID 的隐藏字段,也不知道如何获取此信息。
  • 能否贴出生成上述代码的源代码

标签: magento payment


【解决方案1】:

已经解决了,我们修改了文件:/Madia/Adyen/Model/Adyen/Hpp.php

//To identify and remind user data with mail.
$adyFields['shopperReference'] = $customerEmail; 

它对我们有用。

【讨论】:

    猜你喜欢
    • 2011-04-23
    • 1970-01-01
    • 2015-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-22
    相关资源
    最近更新 更多