使用立即付款按钮(Dwolla)的来宾结帐



我已经浏览了文档,但是找不到如何使用付费现在按钮设置" truefundingsources" true"的示例。

仅适用于服务器到服务器结帐的访客检查?

是否有使用来宾结帐的完整示例?(不只是片段)。

这是我拥有的按钮代码:

<a data-key="YOUR-KEY-HERE" 
data-tax="0" data-shipping="0" data-amount="941.00"
data-desc="Invoice: WDGR112612" 
data-name="October - November " class="dwolla_button" 
href="http://mysite.com/paym/?type=success">Continue</a>

表格代码:

  <p> <?php
    $key = "YOUR_APPLICATION_KEY";
    $secret = "YOUR_APPLICATION_SECRET";
    $timestamp = time();
    $order_id = 1;
    $signature = hash_hmac('sha1', "{$key}&{$timestamp}&{$order_id}", $secret);
    ?>
    <form accept-charset="UTF-8" action="https://www.dwolla.com/payment/pay"
    method="post">
    <input id="key" name="key" type="hidden" value="abcdefg" />
    <input id="signature" name="signature" type="hidden" value="abcd" />
    <input id="callback" name="callback" type="hidden"
    value="http://www.mywebsite.com/callback.aspx" />
    <input id="redirect" name="redirect" type="hidden"
    value="http://www.mywebsite.com/redirect.aspx" />
    <input id="test" name="test" type="hidden" value="true" />
    <input id="name" name="name" type="hidden" value="Purchase" />
    <input id="description" name="description" type="hidden"
    value="Description" />
    <input id="destinationid" name="destinationid" type="hidden"
    value="812-111-1111" />
    <input id="amount" name="amount" type="hidden" value="1.00" />
    <input id="shipping" name="shipping" type="hidden" value="0.00" />
    <input id="tax" name="tax" type="hidden" value="0.00" />
    <input id="orderid" name="orderid" type="hidden" value="188375" />
    <input id="timestamp" name="timestamp" type="hidden"
    value="1323302400" />
    <button type="submit">Pay Now</button>
    </form>

实际上有一种更简单的方法可以在付款按钮上启用访客结帐...

只需在标签中添加"允许 - 吉斯 - 检查"属性,如下所示:

<a href="http://www.example.com" class="dwolla_button" data-key="..." data-tax="0" data-shipping="0.99" data-amount="0.00" data-desc="A button [1]" data-name="Testing mode [1]" data-guest-checkout="true" >A button with GC</a>

要在异地网关会话中启用访客结帐,您需要将"允许Fundingsources"的值设置为" true true"。那是以下行:

<input id="AllowFundingSources" name="AllowFundingSources" type="hidden" value="true" />

为了做到这一点,您需要形成一个看起来如下的请求:

{
  "Key": "testkey",
  "Secret": "testsecret",
  "PurchaseOrder": {
  "DestinationId": "000-000-0000",
  "Discount": 0.00,
  "AllowFundingSources": "true",
  "OrderItems": [
      {
          "Description": "Information about an item",
          "Name": "An item",
          "Price": 5.00,
          "Quantity": 1
      }
  ],
  "Shipping": 0.00,
  "Tax": 0.00,
  "Total": 5.00
  }
}

有关此主题的任何更新将在此处找到。

相关内容

  • 没有找到相关文章

最新更新