2013-06-21 112 views
0

在我的网站我正在整合贝宝立即购买按钮programaticaly。Integrate paypal'立即购买'按钮programaticaly

这是我有:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" style="margin-top: 30px;"> 
<!-- Specify a Buy Now button. --> 
    <input type="hidden" name="cmd" value="_xclick" /> 

    <!-- Identify your business so that you can collect the payments. --> 
    <input type="hidden" name="business" value="[email protected]" /> 
    <!-- Specify details about the item that buyers will purchase. --> 
    <input type="hidden" name="item_name" value="Your items." /> 
    <input type="hidden" name="item_number" value='@Model.OrderId' /> 
    <input type="hidden" name="amount" value='@Model.Total' /> 
    <input type="hidden" name="currency_code" value="DKK" /> 

    <!--Dont want any shipping address. --> 
    <input type="hidden" name="no_shipping" value="1"/> 

    <!-- Specify a URL for the payment confirmation page and a page that is displayed 
     if the user cancels a transaction. Also specify a URL that PayPal can post IPN 
     messages to (see explanation below). --> 
    <input type="hidden" name="return" value="http://mysite.com/Order/Complete/" /> 
    <input type="hidden" name="cancel_return" value="http://mysite.com/Order/Cancel/" /> 
    <input type="hidden" name="notify_url" value="" /> 

    <!-- Do not prompt customers to include a note with their payment. --> 
    <input type="hidden" name="no_note" value="1" /> 

    <!-- Display the payment button. --> 
    <input type="image" name="submit" 
     src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" 
     alt="PayPal — The safer, easier way to pay online." /> 
    <img src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" 
     width="1" height="1" alt="" /> 
</form> 

现在我有没有通过在google找到任何答案了,也是我看到了贝宝的文档但没有真正找到任何:(

几个问题
  1. 当我去贝宝网站时,它没有显示用信用卡支付的选项,它只显示支付选项谁拥有PayPal帐户和选项来创建一个新的PayPal帐户和支付如何使它显示通过信用卡付款的选项 -

  2. 在付款时的贝宝网站,它显示我的电子邮件地址。但我想向我的客户展示我的公司名称,而不是我的电子邮件。我怎么做?

  3. 使用我的PayPal帐户付款后,即使我在'返回'字段中有值,它也不会自动重定向到我的页面。我需要做其他事吗?

将是巨大的,如果有人可以帮助我..

回答

0

选项让买家用信用卡支付仅适用于确认和验证的PayPal帐户。您上面提供的“商业”价值与PayPal账户没有关联 - 它可能不是您正在使用的账户,但这是我目前唯一可用的信息。

买方和卖方都有一些国家限制。

要显示商家名称,您需要将“商家”价值确定为与商家PayPal帐户关联的确认电子邮件地址。

只需定义“返回”变量就不会让买家自动返回到您的网站。您需要在接收者帐户中启用自动返回功能。

+0

嗨..感谢您的回复。我明白了其中的两个答案,但重定向一个。我是否必须在PayPal网站中设置自动重定向链接?该选项仅在我在PayPal中创建按钮时可用,但我不使用paypal提供的向导创建按钮。我将所有参数手动放入我的代码中。你明白我的意思了吗?或者我不理解流程? – kandroid

相关问题