Modification of Paypal Subscription

I was hoping someone could help in changing the price of the subscription.

I have a social network site in which you could initially sign up for a standard or premium account, which differed in those applications that are active in your account.

My client now wants to cancel 2 subscriptions and be able to choose which applications the user wants to use and charge a subscription cost for the total cost of these applications.

I have a "talk" page in which the user clicks the checkbox associated with each application, which then processes the payment, and IPN makes changes to his account, which works fine.

But when the user decides that he wants more or less applications and fills out the form again, I canโ€™t understand how to change their payment.

when I add the change variable to the html form and continue to pay, it leads me to the radio form with other subscriptions from different projects.

I just want to change the total amount of user payments. This is a user-defined form process, there is nothing illegal logging out, itโ€™s just looking for a user to be able to change the subscription speed, which depends on which applications they want actively.

here is my html form:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:20px;"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="******************************" /> <input type="hidden" name="item_name" value="************************ Application Bolt-on's" /> <input type="hidden" name="return" value="http://www.***************.co.uk/?navigation=home"> <input type="hidden" name="cancel_return" value="http://www.***************.co.uk/?navigation=home"> <input type="hidden" name="item_number" value="1" /> <input type="hidden" name="currency_code" value="GBP" /> <?php if( isset( $post['mod'] ) ) { echo "<input type=\"hidden\" name=\"modify\" value=\"2\" />"; echo "<input type=\"hidden\" name=\"a3\" value=\"00.02\" />"; }else{ echo "<input type=\"hidden\" name=\"a3\" value=\"00.01\" />"; } ?> <input type="hidden" name="p3" value="1" /> <input type="hidden" name="t3" value="M" /> <input type="hidden" name="src" value="1" /> <input type="hidden" name="sra" value="1" /> <input type="hidden" name="sra" value="1" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="custom" value="<?php echo $custom_str; ?>" /> <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> </form> 

I have read many articles and do not touch on this subject in the sense of whether it can be done or not, so do not send me links to the PayPal website if this is not the exact answer that I may have missed.

Any help is greatly appreciated

Hi,

Phil

+4
source share
1 answer

Hate to give such a partial answer to your question, but I think the information you need may be in the next blog post http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the -paypal-subscription-blues (Link broken, but left here for attribution purposes)

From this article:

Another complication of PayPal subscriptions is how to allow users to change subscriptions. This is actually where I came to this particular network site. They only offered monthly subscriptions and offered an annual subscription with a discount. The key point here is to ensure that you tell PayPal that you are changing your subscription and not creating a new one. The PayPal documentation describes โ€œchange the attribute that should be sent with the subscription message to paypal. A value of '1 for this attribute indicates that it will modify the existing subscription or create a new one if there is no existing subscription. Do not believe this. My initial testing With the PayPal Developer Sandbox, it seemed like it worked, but in practice, once deployed, it always seemed to create a new subscription, which means that when a user is updated with a monthly subscription for an annual one, she ended up with both.

The fix was to use the value '2 to change when the user has subscriptions, and not use the change attribute at all.

The article is dated 2007 and I will be careful to trust it as the current link, but this can be a good starting point.

+2
source

Source: https://habr.com/ru/post/1310936/


All Articles