贝宝订阅修改 [英] Paypal Subscription Modification

查看:89
本文介绍了贝宝订阅修改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人可以在修改订阅价格方面提供帮助.

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.

我的客户现在可以取消2个订阅,并且可以选择用户要使用的应用程序,并为指定应用程序的总费用收取订阅费用.

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.

我有一个附加项目"页面,用户单击与每个应用程序关联的复选框,然后处理付款,IPN对其帐户进行修改就可以了.

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.

但是当用户决定他们想要更多或更少的应用程序并再次填写表格时,我不知道如何修改他们的付款.

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.

当我将Modify变量添加到html表单并继续付款时,它使我进入了广播表单,其中包含来自不同项目的其他订阅.

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.

我只是想修改用户付款的总支出.这是用户流程的形式,没有什么不合法的事情,只是在寻找用户是否能够更改订阅率,这取决于他们想要激活的应用程序.

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.

这是我的html表单:

here's 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>

我已经阅读了许多文章,并且从某种意义上说与这件事无关,因此请不要发送给我我的Paypal网站链接,除非它是我可能错过的确切答案.

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.

非常感谢您的帮助,

此致

菲尔

推荐答案

讨厌部分地回答您的问题,但我认为您需要的信息可能在以下博客文章 http://talklikeaduck.denhaven2.com/2007/09/02/如何治愈贝宝订阅忧郁症 (链接已断开,但出于归因目的留在此处)

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)

从该文章:

PayPal的另一种复杂性 订阅是如何允许用户 修改订阅.其实这是 我在这个特定网站上的位置 地点.他们只提供 每月订阅,并希望 提供年度订阅 折扣.这里的关键是要确保 您告诉贝宝您 修改订阅而不是修改 创建一个新的.贝宝 文档描述了修改" 要与之一起传递的属性 订阅注册请求帖子 支付宝.为此,值为"1" 属性指示它将 修改现有订阅,或 如果没有,创建一个新的 现有订阅.不要相信 这.我最初的测试 PayPal开发人员沙箱似乎 表示这有效.在实践中 但是,一旦部署,它总是 似乎创建了一个新的订阅, 这意味着当用户升级时 每月订阅一次 一个,她最终都选择了.

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.

解决方法是将值"2"用于 修改用户已有的时间 订阅,而不要使用 否则就修改属性.

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年,我将谨慎地将其作为当前参考,但这可能是一个很好的起点.

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.

这篇关于贝宝订阅修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆