PayPal Recurring Payments - Testing Failed Payments

Hi, i have implemented Reccuring Subscription Payments into my website which now works fine... i have tested the following:

- member joining and paying
- processing the second, third etc payments...
- the member cancelling their recurring profile under their PayPal account and notifying the website admin

However, one area that i can't seem to test... failed payments...

- i created a new PayPal account and transferred (from another PayPal account) enough for 2 recurring payments and did not link a bank account or credit card but when i go to pay for the membership it won't allow me to pay because i don't have a credit card or bank account linked :-)

How can i get a recurring payment to fail so that i can test it... i have even tried in the SandBox environment but that operates the same as the above...
oo7mlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew AngellCo-Owner / DeveloperCommented:
Testing recurring payments in the sandbox can be kind of a drag because there's no way to speed it up anymore and the simulator doesn't contain any tools for recurring payments (yet).  

What I like to do is create my own simulator to test this sort of thing.  You can make a basic HTML form with the action set to your IPN URL.  Then add hidden fields that match the names/values you'd expect to get from an IPN of any particular type.

Then you can load that in your browser and submit it to test accordingly.  This allows you to see the result on screen, too, which can help with troubleshooting.

Keep in mind that when testing this way the IPN will come back as unverified since the data did not originate from PayPal's server.  You'll just need to make sure your code logic handles that accordingly.
0
oo7mlAuthor Commented:
Thanks but how does this allow me to correct failed payments... for example when the customers credit card is maxed or some other failed payment...
0
Andrew AngellCo-Owner / DeveloperCommented:
It will allow you to test whatever procedure you're putting in place for that.  An IPN notification will do nothing more than that...notify your script that the payment failed.  It will be up to you to handle that however you want, be it send the person an email with a link to update check and update their card details, call to update, or whatever.

With that in place you can then test it within your own IPN simulator.
0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

oo7mlAuthor Commented:
Ok thanks, but the main problem is that we do not have know the variables that are included in the failed IPN message, so how can we test it if we don't know what is supposed to come back
0
Andrew AngellCo-Owner / DeveloperCommented:
Here's a sample of a failed IPN.

payment_cycle = Monthly
txn_type = recurring_payment_failed
last_name = Testerson
next_payment_date = 03:00:00 Sep 08, 2013 PDT
residence_country = US
initial_payment_amount = 0.00
currency_code = USD
time_created = 14:09:38 Sep 08, 2012 PDT
verify_sign = ABpW1yBTkhMtP7jXMTp1y3seU-QHAo0w8vR1AfCZU7UOgYe1TBFIB4T8
period_type = Regular
payer_status = unverified
test_ipn = 1
tax = 0.00
payer_email = sandbox@domain.com
first_name = Tester
receiver_email = sandbo_1215254764_biz@angelleye.com
payer_id = 9FTZDYYPQLHZW
product_type = 1
shipping = 0.00
amount_per_cycle = 25.00
profile_status = Active
charset = windows-1252
notify_version = 3.7
amount = 25.00
outstanding_balance = 175.00
recurring_payment_id = I-PFCUWT604FWT
product_name = Knewedge Subscription
ipn_track_id = a7068b9997040

Open in new window


And here's a sample of a "skipped" payment IPN.

payment_cycle = Monthly
txn_type = recurring_payment_skipped
last_name = NotProvided
next_payment_date = 03:00:00 Sep 08, 2013 PDT
residence_country = US
initial_payment_amount = 0.00
currency_code = USD
time_created = 08:28:57 Jun 29, 2013 PDT
verify_sign = AfSvvEwPTXUEvLkwqHTeeOMVgs-UAHJ.n58qhwER.iEXiyqM8fR-pLjw
period_type = Regular
payer_status = verified
test_ipn = 1
tax = 0.00
payer_email = nmdnm@dgkdjh.com
first_name = Ghcvuuvuvbiibbiibnoononi
receiver_email = sandbo_1215254764_biz@angelleye.com
payer_id = Z9VRN3XX74AQG
product_type = 1
shipping = 0.00
amount_per_cycle = 20.00
profile_status = Active
charset = windows-1252
notify_version = 3.7
amount = 20.00
outstanding_balance = 40.00
recurring_payment_id = I-M1JGWSER79FU
product_name = Cheap To Ship Recurring Payment
ipn_track_id = a3bcaf1149b33

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oo7mlAuthor Commented:
Many thanks...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.