1. <progress id="jqxo2"><bdo id="jqxo2"><dfn id="jqxo2"></dfn></bdo></progress>
    <menuitem id="jqxo2"><strong id="jqxo2"></strong></menuitem>
    1. <samp id="jqxo2"></samp>

      美国支付平台2checkout支付接口介绍

      2015-12-19 15:11:51来源:威易网作者:icech

      2checkout是美国的第三方在线支付平台,与paypal、stripe一样。之前也用过其他的接口,感觉除了ccnow之外,其他都还比较类似。2checkout也与paypal差不多。

      2checkout是美国的第三方在线支付平台,与paypal、stripe一样。之前也用过其他的接口,感觉除了ccnow之外,其他都还比较类似。2checkout也与paypal差不多。

      首先,到2checkout注册,并且获得官方认证。认证通过后,在“Account Status”中的“Sell Status”会显示“Approved to Sell”,“Payment Status”会显示“Eligible for Payments”(如图)。

      \

      下面就可以开始创建支付接口了,详细的介绍在:
      https://www.2checkout.com/documentation/payment-api/paypal-direct

      icech使用的是PayPal Direct方式,Demo代码如下:

      <form action="https://www.2checkout.com/checkout/purchase" method="post">
        <input name="sid" type="hidden" value="1817037">
        <input name="mode" type="hidden" value="2CO">
        <input name="return_url" type="hidden" value="https://www.example.com/cart/">
        <input name="li_0_name" type="hidden" value="invoice123">
        <input name="li_0_price" type="hidden" value="25.99">
        <input name="card_holder_name" type="hidden" value="Checkout Shopper">
        <input name="street_address" type="hidden" value="123 Test Address">
        <input name="street_address2" type="hidden" value="Suite 200">
        <input name="city" type="hidden" value="Columbus">
        <input name="state" type="hidden" value="OH">
        <input name="zip" type="hidden" value="43228">
        <input name="country" type="hidden" value="USA">
        <input name="email" type="hidden" value="example@2co.com">
        <input name="phone" type="hidden" value="614-921-2450">
        <input name="ship_name" type="hidden" value="Gift Receiver">
        <input name="ship_street_address" type="hidden" value="1234 Address Road">
        <input name="ship_street_address2" type="hidden" value="Apartment 123">
        <input name="ship_city" type="hidden" value="Columbus">
        <input name="ship_state" type="hidden" value="OH">
        <input name="ship_zip" type="hidden" value="43235">
        <input name="ship_country" type="hidden" value="USA">
        <input name="paypal_direct" type="hidden" value="Y">
        <input type="submit" value="Submit Payment">
      </form>

      这里最重要的是sid参数,其实就是“Account Number”信息(如图),其他有用的信息如li_0_name、li_0_price。所以精简后的代码为:

      \

      <form action="https://www.2checkout.com/checkout/purchase" method="post">
        <input name="sid" type="hidden" value="1817037">
        <input name="mode" type="hidden" value="2CO">
        <input name="return_url" type="hidden" value="https://www.example.com/cart/">
        <input name="li_0_name" type="hidden" value="invoice123">
        <input name="li_0_price" type="hidden" value="25.99">
        <input name="paypal_direct" type="hidden" value="Y">
        <input type="submit" value="Submit Payment">
      </form>

      了解这些就差不多了,2checkout的其他接口也不复杂,这里就不多做介绍了。

      在娇嫩的肉蚌中间磨动了几下

      1. <progress id="jqxo2"><bdo id="jqxo2"><dfn id="jqxo2"></dfn></bdo></progress>
        <menuitem id="jqxo2"><strong id="jqxo2"></strong></menuitem>
        1. <samp id="jqxo2"></samp>