简体   繁体   中英

How to Change Recurring Amount in Paypal Recurring Method (every month)

I need to implemented recurring payment in one of my project. I made the demo of this using paypal API. But my main issue is in my project the amount is not same everyone. It is getting calculated based on the services user use in that month. So I want to make such module that once the user subscribe on the site, every month he should be billed but with different amount.

Below script is working perfectly for paypal reccuring method. It deduct $79 every month till 15 cycle from buyer's paypal account and also credit to the merchant account as i have tested.

Now i want to change that reccuring amount programatically by $49 for last 5 cycle (for specific cycle) so please help me to change that recurring amount.

<form id="paypal_form" class="paypal" action="payments.php" method="post">

<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="MERCHANT_EMAIL">
<input type="hidden" name="item_name" value="Subscription Plan - GOLD">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="image_url" value="https://www.google.com">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="RETURN_URL">
<input type="hidden" name="cancel_return" value="CANCLE_URL">

<input type="hidden" name="a3" value="79.00">
<!-- a3 - amount to be invoiced each recurrence -->
<input type="hidden" name="p3" value="1">
<!-- p3 - number of time periods between each recurrence -->
<input type="hidden" name="t3" value="M">
<!-- t3 - time period (D=days, W=weeks, M=months, Y=years) -->

<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="srt" value="15">
<input type="hidden" name="no_note" value="1">

<input type="hidden" name="usr_manage" value="1">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border="0" name="submit" alt="Make payments with PayPal - it’s fast, free and secure!">
</form>

I am posting all this parameters to paypal url : https://www.sandbox.paypal.com/cgi-bin/webscr

Please guide me on this or I am missing something in this integration?

您可以在javascript中处理案例并动态更改付款金额和付款频率

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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