Paypal订阅修改

发布于 2024-09-03 11:21:35 字数 2195 浏览 3 评论 0原文

我希望有人可以帮助修改订阅价格。

我有一个社交网站,您最初可以在其中订阅标准或高级帐户,这些帐户在您的帐户中活动的应用程序方面有所不同。

我的客户现在要取消这 2 个订阅,并能够选择用户想要使用的应用程序,并根据指定应用程序的总成本收取订阅费用。

我有一个“附加”页面,用户在其中单击与每个应用程序关联的复选框,然后处理付款,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 网站的链接,除非这是我可能错过的确切答案。

非常感谢任何帮助,

问候,

菲尔

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.

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.

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.

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>

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鱼忆七猫命九 2024-09-10 11:21:35

不想对您的问题给出如此部分的不回答,但我认为您需要的信息可能在以下博客文章http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the-paypal-subscription-blues (链接已损坏,但出于归属目的保留在此处)

来自该文章:

PayPal 的另一个复杂性
订阅是如何让用户
修改订阅。事实上这是
我进入这个特定网络的地方
地点。他们一直只提供
每月订阅并想要
提供年度订阅
折扣。这里的关键是要确保
您告诉 PayPal 您是
修改订阅而不是
创建一个新的。贝宝
文档描述了“修改”
要传递的属性
订阅注册请求帖子
到贝宝。值为“1”
属性表明它将
修改现有订阅,或者
如果没有则创建一个新的
现有订阅。别相信
这。我的初步测试
PayPal 开发者沙箱似乎
表明这有效。在实践中
不过,一旦部署,它总是
似乎创建了一个新的订阅,
这意味着当用户升级时
按月订阅按年订阅
一,她最终两者兼而有之。

修复方法是使用值“2”
当用户已有现有的
订阅,并且不使用
否则根本不修改属性。

这篇文章的日期是 2007 年,我会小心地相信它作为当前的参考,但这可能是一个很好的起点。

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)

From that article:

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文