简体   繁体   English

贝宝订阅修改

[英]Paypal Subscription Modification

I was hoping someone could help regarding modifying a subscription price. 我希望有人可以帮助您修改订阅价格。

I have a social networking site In which you originally could subscribe to a standard or premium account which varied in what applications where active in your account. 我有一个社交网站,您最初可以在其中订阅一个标准帐户或高级帐户,该帐户的活动状态因应用程序而异。

My client now whats to scrap the 2 subscriptions and be able to give a choice of what applications the user wants to use and charge a subscription cost for the total cost for the applications specified. 现在,我的客户可以取消2个订阅,可以选择用户要使用的应用程序,并可以为指定应用程序的总费用收取订阅费用。

I have a 'bolt-ons' page in which the user clicks a checkbox associated with each application, which then processes the payment and the IPN makes modifications to their account which works fine. 我有一个“附加组件”页面,在该页面中,用户单击与每个应用程序关联的复选框,然后该复选框将处理付款,并且IPN对其帐户进行修改可以正常工作。

But when a user decides they want more or less applications and fills out the form again, I can't figure out how to modify their payment. 但是,当用户决定需要更多或更少的应用程序并再次填写表格时,我不知道如何修改他们的付款。

when I add the modify variable to the html form and continue the payment, it brings me to a radio form with other subscriptions from different projects. 当我将Modify变量添加到html表单并继续付款时,它使我进入了带有来自不同项目的其他订阅的广播表单。

I simply want to modify the total outgoings of the users payments. 我只想修改用户付款的总支出。 It is the user the process's the form, there is nothing illegitimate going off, just simply looking for the user to be able to change the subscription rate which depends on what applications they want active. 这是用户流程的形式,没有什么不合法的事情,只是简单地寻找用户就可以根据用户想要激活的应用程序来更改订阅率。

here's my html form: 这是我的html表单:

<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 non touch on this subject in a sense of whether it can or cannot be done so please don't send me links the the paypal site unless it is the exact answer which I may have missed. 我已经阅读了许多文章,并且从某种意义上说与这件事无关,因此请不要发送给我我贝宝网站的链接,除非它是我可能错过的确切答案。

Any help is much appreciated, 任何帮助深表感谢,

Regards, 问候,

Phil 菲尔

Hate to give such a partial non-answer to your question, but I think the information you need might be in the following blog post http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the-paypal-subscription-blues (Link is broken, but left here for attribution purposes) 讨厌对您的问题做出这样的部分非回答,但我认为您需要的信息可能在以下博客文章中: http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the -paypal-subscription-blues (链接已断开,但出于归因目的留在此处)

From that article: 从那篇文章:

Another complexity of PayPal subscriptions is how to allow users to modify subscriptions. PayPal订阅的另一个复杂性是如何允许用户修改订阅。 In fact this is where I came in on this particular web site. 实际上,这就是我进入该特定网站的地方。 They had been offering only monthly subscriptions and wanted to offer an annual subscription with a discount. 他们一直只提供每月订阅,并希望提供具有折扣的年度订阅。 The key here is to ensure that you tell PayPal that you are modifying a subscription rather than creating a new one. 此处的关键是确保您告诉PayPal您正在修改订阅,而不是创建新订阅。 The PayPal documentation describes the 'modify' attribute which is to be passed with the subscription signup request post to paypal. 贝宝(PayPal)文档描述了“修改”(modify)属性,该属性将与订阅注册请求发布一起传递给贝宝。 A value of '1' for this attribute indicates that it will modify an existing subscription, or create a new one if there is no existing subscription. 此属性的值“ 1”表示它将修改现有的订阅,如果不存在现有的订阅,则创建一个新的订阅。 Don't beleive this. 不要相信这一点。 My initial testing with the PayPal developer sandbox seemed to indicate that this worked. 我对PayPal开发人员沙盒的初步测试似乎表明这可行。 In practice though, once deployed, it always seemed to create a new subscription, which meant that when a user upgraded a monthly subscription to an annual one, she ended up with both. 但是实际上,一旦部署,它似乎总是会创建一个新的订阅,这意味着当用户将每月订阅升级为年度订阅时,她最终会同时拥有这两个订阅。

The fix was to use a value of '2' for modify when the user had an existing subscription, and not to use the modify attribute at all otherwise. 解决方法是在用户拥有现有订阅时使用值“ 2”进行修改,否则完全不使用Modify属性。

The article is dated 2007 and I would be careful to trust it as a current reference, but it might be a good starting point. 本文的日期为2007年,我将谨慎地将其作为当前参考,但这可能是一个很好的起点。

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

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