将 PayPal 集成到注册系统中最简单的方法是什么?

发布于 2024-08-02 19:20:42 字数 165 浏览 3 评论 0原文

如何将一次性费用整合到 paypal 中?

用户单击“注册”,然后进入一个页面以确认条款和条件,并支付 50 英镑,然后 - 如果成功,他们将进入一个可以输入详细信息并创建帐户的页面...但我只想要这个来自 paypal 的用户可以看到页面。

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

How do I integrate a one time fee into paypal?

The user clicks SignUp then is taken to a page to confirm t&c's and where they pay £50, they are then - if successful, taken to a page where they can enter details and create an account... but I only want this page to be visible to users coming from paypal.

I thought about using tokens, but I do not know how to use them.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

始终不够 2024-08-09 19:20:43

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

流程会像这样工作。

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

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

如果这没有意义或者需要进行哪些额外的阐述,请告诉我。另外,如果您让我知道您使用什么语言进行编码,我可以为您提供一些示例代码。

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

--Dan

[编辑]

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

    <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="[email protected]" 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>

You can use the paypal IPN which they are plenty of code samples and the paypal sandbox has some great tools to get you started.

The flow would work like this.

  1. User selects that they want to sign up on your site and they fill out a form (contact info, accept terms and conditions, etc).
  2. They then click purchase registrations, etc.
  3. Your site posts all the details of the contact form along with the cost of registration to Paypal for the user to pay.
  4. The user completes payment on the paypal site and is taken to a success page which informs them they will shortly receive an email regarding their registration.

Your back end...
1. After the user pays, paypal will post the details of the transaction to a URL you provide.
2. Your system completes a handshake over a connection to paypal.
3. Paypal sends the details of the transaction back to your server and you validate the total and any other necessary validations.
4. After validation, you system generates an email to the new user with their account details.

Let me know if that does not make sense or what additional elaborations are needed. Also if you let me know what language your coding in, I can pull up some sample code for you.

[EDIT]
Here is a URL to the paypal IPN --> https://www.paypal.com/ipn

--Dan

[edit]

Here is an example form. This form posts a single item for payment to paypal.

    <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="[email protected]" 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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文