在沙盒中测试Paypal定期付款的整个周期 [英] Testing whole cycle of paypal recurring payment at sandbox

查看:194
本文介绍了在沙盒中测试Paypal定期付款的整个周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试执行贝宝的定期付款,并且我想测试整个周期".我发现这篇文章 http://www.paypalobjects.com/en_US/ebook/PP_Sandbox_UserGuide /testing_recurringpayments.html 以及stackoverlfow中的一些引用,它应该可以工作.但是对我来说,它似乎不起作用.也许我必须为此研究代码,但我想知道这是否真的有效?

I am currently trying to implement paypal recurring payment and I would like to test "whole cycle". I found this article http://www.paypalobjects.com/en_US/ebook/PP_Sandbox_UserGuide/testing_recurringpayments.html and also some references in stackoverlfow that it should work. But for me it does not seem to work. Maybe I have to dig into code for that but I was wondering should this actually work?

我正在使用 https://github.com/thenbrent/paypal-digital-goods库和我的订阅详细信息如下:

I am using https://github.com/thenbrent/paypal-digital-goods library and I subscription details are following:

$subscriptionDetails = array(
  'description'        => 'Subscription for $10/month for the next year.',
  'initial_amount'     => '10.00',
  'amount'             => '10.00',
  'period'             => 'Day',
  'frequency'          => '1',
  'total_cycles'       => '12',
);

$pay = new PayPal_Subscription( $subscriptionDetails );

我已经在通知接收端建立了日志记录,但是只有在创建新的个人资料时它才会被点击.

I have put up logging at my notification receiving end but it only get's hit when I make new profile.

推荐答案

在实际网站上,经过指定的实际时间后,计费周期便会重复;例如,一个月的计费周期需要一个月的时间.在测试定期付款配置文件时,您可以在沙盒中模拟一个计费周期的经过时间,在这种情况下,实际经过时间会减少.当您想模拟计费周期而不等待实际时间过去时,此功能很有用.

On the live site, a billing cycle repeats after the actual specified time elapses; for example, a one month billing cycle takes one month to occur. You can simulate the elapsed time for a billing cycle in the Sandbox when testing a recurring payments profile, in which case the actual elapsed time is reduced. This is useful when you want to simulate a billing cycle without waiting for the actual time to elapse.

要减少实际经过的时间,请指定 Day 作为时间段.当您指定日期"时,计费周期每隔n分钟在沙箱"中发生 ,其中n表示频率;例如,如果您在执行CreateRecurringPaymentsProfile API时为计费频率指定1,为期间指定天,则在沙盒中进行测试时,计费周期每分钟发生一次.

To reduce the actual elapsed time, you specify Day as the period. When you specify Day, the billing cycle occurs every n minutes in the Sandbox, where n represents the frequency; for example, if you specify 1 for the billing frequency and Day for the period when executing the CreateRecurringPaymentsProfile API, the billing cycle occurs every minute when testing in the Sandbox.

只有当时间段为Day时,才可以减少经过的时间.其他值不会更改实际的经过时间.

请考虑一种情况,您要在经过三个月的试用期后模拟一个月的计费周期,而不必等待四个月.在沙盒中,您可以指定以下NVP参数:

Consider a scenario in which you want to simulate a one-month billing cycle after a three-month trial, without waiting four months. In the Sandbox, you could specify the following NVP parameters:

...&TRIALBILLINGPERIOD=Day&TRIALBILLINGFREQUENCY=3
...&BILLINGPERIOD=Day&BILLINGFREQUENCY=1...

在沙盒中,试用计费期大约需要3分钟,而常规计费周期大约每分钟发生一次.当您准备好上线时,可以将试用结算期和结算期更改为月".

In the Sandbox, the trial billing period would take approximately 3 minutes and the regular billing cycle would occur approximately every minute. When you are ready to go live, you would change the trial billing period and the billing period to Month.

如果这不起作用,请发布您的CreateRecurringBillingProfile请求和响应,我们可以对其进行进一步调查.

If this does not work, post your CreateRecurringBillingProfile request and response, and we can look into it further.

这篇关于在沙盒中测试Paypal定期付款的整个周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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