Testing recurring payments (paypal IPN)
Asked Answered
A

3

7

I am trying to set up a recurring payment service using paypal, my problem is I cant seem to find a way to test it, I already set up at Daily period and 1 as frequency but still the account seems to take a month to make the next payment,

Paypal says if you set it to Day it would take minutes instead, but its not even taking a day next payment date is set to one month, has anyone encountered the same issue or better yet, a solution to test it?

Thanks

Here's the NVP I send:

&AMT=19.95
&CURRENCYCODE=USD
&PROFILESTARTDATE=2012-05-30+T9%3A0%3A0
&TOKEN=XX-xxXxxxxxXXxxxxxxX
&BILLINGPERIOD=Day
&BILLINGFREQUENCY=1
&BILLINGTYPE=RecurringPayments
&DESC=\Subscription
&AUTOBILLOUTAMT=AddToNextBilling
&[email protected]
&FIRSTNAME=juanito
&LASTNAME=escarcha
&STREET=manzanares
&CITY=gdl
&STATE=jal
&COUNTRYCODE=MX
&ZIP=12345

Here's what paypal returns:

(
    [payment_cycle] => Daily
    [txn_type] => recurring_payment_profile_created
    [last_name] => perez
    [next_payment_date] => 03:00:00 May 30, 2012 PDT
    [residence_country] => MX
    [initial_payment_amount] => 0.00
    [currency_code] => USD
    [time_created] => 12:24:08 Apr 30, 2012 PDT
    [verify_sign] => XXXXXXXXXxxxxxxx
    [period_type] =>  Regular
    [payer_status] => unverified
    [test_ipn] => 1
    [tax] => 0.00
    [payer_email] => [email protected]
    [first_name] => juan
    [receiver_email] => [email protected]
    [payer_id] => XXXXXXxxxxxXXX
    [product_type] => 1
    [shipping] => 0.00
    [amount_per_cycle] => 19.95
    [profile_status] => Active
    [charset] => windows-1252
    [notify_version] => 3.4
    [amount] => 19.95
    [outstanding_balance] => 0.00
    [recurring_payment_id] => I-8JXMN6XXXXX
    [product_name] => Subscription
    [ipn_track_id] => 57fbxxXXXXXxx
)

Everything seem to be fine except paypal wants to charge the next payment a month from today

Andesine answered 30/4, 2012 at 19:54 Comment(0)
S
3

You send

PROFILESTARTDATE=2012-05-30+T9:0:0

and next payment date (here it is the first payment) is on this day.

[next_payment_date] => 03:00:00 May 30, 2012 PDT

It seems, it is correct. You should change your profile start date I think.

Santa answered 10/5, 2012 at 15:11 Comment(0)
N
1

Paypal has a built in IPN tester tool to help debug your IPN listener and make sure it is logging everything correctly. It will send the same query variables to your endpoint as a real IPN notification post so you can simulate what happens in a real payment situation.

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNTesting#id089BD0L50PF

If you are having trouble with the frequency of the the recurring payments, this needs to be configured in the variables for your first subscribing post to paypal. Can you share fields you are using in your subscription request? (redacting the sensitive data, of course)

Nightly answered 30/4, 2012 at 20:2 Comment(2)
The IPN simulator does not cover recurring payments (unfortunately)Gujral
For anyone interested, I worked out a way to alter the IPN simulator to support recurring payments... https://mcmap.net/q/1544369/-testing-recurring-payments-in-the-paypal-sandbox Of course the problem that you cannot edit the statuses or variables of the profile outside of the API's reach (like setting an outstanding amount to test failed payments) is still a problem.African
M
0

CreateRecurringPaymentsProfile doesn't accept the NOTIFYURL parameter; rather, you need to set up an IPN URL within the Profile of your PayPal account. This is the IPN URL that will be used for the recurring payment IPN message(s).

Please visit: https://www.paypal-community.com/t5/Merchant-services-Archive/Recurring-payments-IPN/td-p/350104

Maddi answered 12/3, 2013 at 8:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.