我希望有人可以帮助修改订阅价格.
我有一个社交网站,您最初可以在其中订阅标准或高级帐户,该帐户在您的帐户中处于活动状态的应用程序中有所不同.
我的客户现在要废弃2个订阅,并能够选择用户想要使用的应用程序,并收取指定应用程序的总成本的订阅成本.
我有一个’bolt-ons’页面,用户点击与每个应用程序关联的复选框,然后处理付款,IPN对其帐户进行修改,工作正常.
但是当用户决定他们想要更多或更少的应用程序并再次填写表单时,我无法弄清楚如何修改他们的付款.
当我将修改变量添加到html表单并继续付款时,它会将我带到一个广播表单,其中包含来自不同项目的其他订阅.
我只是想修改用户付款的总支出.用户是进程的形式,没有任何非法的关闭,只是简单地寻找用户能够更改订阅率,这取决于他们想要活动的应用程序.
这是我的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>
我已经阅读了很多关于这个主题的文章和非触摸,无论是否可以这样做,请不要发送给paypal网站的链接,除非它是我可能错过的确切答案.
任何帮助深表感谢,
问候,
菲尔
最佳答案 讨厌对你的问题给出这样的部分答案,但我认为你需要的信息可能出现在以下博客文章
http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the-paypal-subscription-blues中(链接已被破坏,但为了归属目的留在这里)
从那篇文章:
Another complexity of PayPal
subscriptions is how to allow users to
modify subscriptions. 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. The PayPal
documentation describes the ‘modify’
attribute which is to be passed with
the subscription signup request post
to paypal. 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. Don’t beleive
this. My initial testing with the
PayPal developer sandbox seemed to
indicate that this worked. 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.
这篇文章的日期是2007年,我会谨慎地相信它作为当前的参考,但它可能是一个很好的起点.