简体   繁体   English

Paypal标准订阅,可变金额订阅

[英]Paypal standard subscription with Variable amount subscriptions

When going through the Paypal docs it clearly mentions that Paypal Payments Standard supports Variable amount subscriptions 通过Paypal文档时,它明确提到Paypal Payments Standard支持Variable amount subscriptions

I have created the sandbox account for both business and customer. 我为业务和客户创建了沙盒帐户。 created subscription button and subscribed with customer account successfully. 创建订阅按钮并成功订阅客户帐户。

But couldn't find a way to initiate variable amount subscription to be debited to customer account/card. 但无法找到一种方法来启动可变金额订阅以借记到客户帐户/卡。

Again also I couldn't find a way to automate this task using API for website payment standard. 同样,我也找不到使用API​​进行网站支付标准自动完成此任务的方法。

Express checkout have API but that only supports fixed amount subscription as per the docs. 快速结账有API,但只支持按文档定额订阅。

any direction on this will be greatly appreciated. 对此的任何指示都将不胜感激。

Check with following code, It will have option to charge 3 different amount from one subscription, you can set price - duration for each amount as per your requirement: 请查看以下代码,它可以选择从一个订阅中收取3个不同的金额,您可以根据您的要求设置每个金额的价格 - 持续时间:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="YOUR_PAYPAL BUSINESS EMAIL ACCOUNT">
<input type="hidden" name="return" value="http://localhost/wow1.php">
<input type="hidden" name="item_name" value="NEW subscription">
<!-- First Variable AMOUNT END-->
<input type="hidden" name="a1" value="20"> <!-- SET AMOUNT -->
<input type="hidden" name="p1" value="3"> <!-- SET INTEGER VALUE -->
<input type="hidden" name="t1" value="M"> <!-- SET DAY,WEEK,MONTH,YEAR -->
<!-- First Variable AMOUNT END-->

<!-- Second Variable AMOUNT -->
<input type="hidden" name="a2" value="15"> <!-- SET AMOUNT -->
<input type="hidden" name="p2" value="3"> <!-- SET INTEGER VALUE -->
<input type="hidden" name="t2" value="M"> <!-- SET DAY,WEEK,MONTH,YEAR -->
<!-- Second Variable AMOUNT END-->

<!-- FIXED AMOUNT -->
<input type="hidden" name="a3" value="10"> <!-- SET AMOUNT -->
<input type="hidden" name="p3" value="1"> <!-- SET INTEGER VALUE -->
<input type="hidden" name="t3" value="Y"> <!-- SET DAY,WEEK,MONTH,YEAR -->
<!-- FIXED AMOUNT END -->

<input type="image" src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_subscribe_113x26.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

For more info, check Sample subscription code . 有关详细信息,请查看示例订阅代码 Hope it will help you! 希望它能帮到你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM