简体   繁体   English

贝宝订阅/定期付款

[英]Paypal subscriptions / recurring payments

I am trying to set up multiple recurring payment for my website but when I post to Paypal only the last item is displayed on paypal payment screen. 我正在尝试为我的网站设置多次重复付款,但是当我发布到Paypal时,仅最后一项显示在Paypal付款屏幕上。 All other items are ignored. 所有其他项目都将被忽略。

Here is the code that I am using 这是我正在使用的代码

String url;
url = "https://www.paypal.com/us/cgi-bin/webscr?";    
url += "cmd=_xclick-subscriptions";

url += "&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString();
url += "&src=1";
url += "&sra=1";

if (!chargedListings && chkListingModules.Checked)
{

                url += "&item_name=Listing Module";
                url += "&a3=" + listingCharges;
                url += "&p3=1";
                url += "&t3=M";
                url += "&item_number=1";
                i++;
}

if (!chargedDB && chkDB.Checked)
{
                sendToPaypal = true;
                url += "&item_name=Database";
                url += "&a3=" + emailCharges;
                url += "&p3=1";
                url += "&t3=M";
                url += "&item_number=2";

                i++;
}

Not really sure what I am doing wrong here. 不太确定我在这里做错了什么。 I have looked through the paypal documentation but so far havent found anything useful. 我浏览了Paypal文档,但到目前为止还没有发现任何有用的信息。

Any help would be greatly appreciated. 任何帮助将不胜感激。 Thanks in advance 提前致谢

You cannot itemize subscriptions on PayPal with PayPal Payments Standard. 您无法使用PayPal Payments标准逐项列出PayPal上的订阅。 Here is what PayPal says about the item_name parameter (found here ): 这是PayPal关于item_name参数(在此处找到)说的:

Description of item being sold. 所售商品的描述。 If you are collecting aggregate payments, the value can be a summary of all items purchased, a tracking number, or a generic term such as "subscription." 如果您正在收集总计付款,则该值可以是所有已购买商品的摘要,跟踪号或通用术语,例如“订阅”。

The item_name parameter is meant only to be used once per transaction. item_name参数只能在每个事务中使用一次。 So the reason it only takes the last item is because you are passing multiple instances of the same parameter in your URL (passing &item_name=Listing Module followed by &item_name=Database ). 因此,它只占用最后一项的原因是因为您正在URL中传递同一参数的多个实例(传递&item_name=Listing Module然后传递&item_name=Database )。 If you want to make a single subscription for all these products, you will want to figure the price of everything and assign that to a3 and make an item_name that covers both. 如果您要为所有这些产品进行单一订阅,则需要计算所有商品的价格,并将其分配给a3并创建一个涵盖两者的item_name If you want each of these items to have different subscription terms, then you would need to generate different subscriptions for each. 如果您希望每个项目都具有不同的订阅条款,那么您将需要为每个项目生成不同的订阅。

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

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