3

如何将一次性费用集成到贝宝?

用户单击注册,然后被带到一个页面以确认 t&c,他们支付 50 英镑,然后他们 - 如果成功,被带到一个页面,他们可以在其中输入详细信息并创建一个帐户......但我只希望这个页面对来自贝宝的用户可见。

我想过使用令牌,但我不知道如何使用它们。

4

1 回答 1

9

您可以使用 paypal IPN,其中包含大量代码示例,并且 paypal 沙箱有一些很棒的工具可以帮助您入门。

流程将像这样工作。

  1. 用户选择他们想在您的网站上注册并填写表格(联系信息、接受条款和条件等)。
  2. 然后他们点击购买注册等。
  3. 您的网站会发布联系表的所有详细信息以及向 Paypal 注册的费用,供用户支付。
  4. 用户在贝宝网站上完成付款并被带到一个成功页面,通知他们很快会收到一封关于他们注册的电子邮件。

您的后端... 1. 用户付款后,paypal会将交易详情发布到您提供的URL。2. 您的系统通过与贝宝的连接完成握手。3. Paypal 将交易的详细信息发送回您的服务器,然后您验证总数和任何其他必要的验证。4. 验证后,您的系统会向新用户生成一封包含其帐户详细信息的电子邮件。

让我知道这是否没有意义或需要什么额外的说明。另外,如果您让我知道您的编码是什么语言,我可以为您提取一些示例代码。

[编辑] 这是 paypal IPN 的 URL --> https://www.paypal.com/ipn

- 担

[编辑]

这是一个示例表格。此表单发布单个项目以向贝宝付款。

    <form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="rm" value="2" id="PayPalRm" />
<input type="hidden" name="cmd" value="_xclick" id="PayPalCmd" />
<input type="hidden" name="business" value="seller@paypal.account" id="PayPalBusiness" /> 
<input type="hidden" name="return" value="http://localhost/inventories/success" id="PayPalReturn" />
<input type="hidden" name="cancel_return" value="http://localhost/inventories/cancel" id="PayPalCancelReturn" />
<input type="hidden" name="notify_url" value="http://localhost/Paypal_orders/process" id="PayPalNotifyUrl" />
<input type="hidden" name="item_name" value="product name" id="PayPalItemName" />
<input type="hidden" name="quantity" value="1" id="PayPalQuantity" />
<input type="hidden" name="no_shipping" value="2" id="PayPalNoShipping" />
<input type="hidden" name="shipping" value="2.5" id="PayPalShipping" />
<input type="hidden" name="shipping2" value="2.5" id="PayPalShipping2" />
<input type="hidden" name="no_note" value="1" id="PayPalNoNote" />
<input type="hidden" name="lc" value="US" id="PayPalLc" />
<input type="hidden" name="country" value="US" id="PayPalCountry" />
<input type="hidden" name="bn" value="PP-BuyNowBF" id="PayPalBn" />
<input type="hidden" name="amount" value="12" id="PayPalAmount" />
<div class="submit"><input type="submit" value="Click Here" /></div></form>
于 2009-08-22T12:48:41.933 回答