bkeating / python-payflowpro

A simple Python client for PayPal's Payflow Pro API (HTTPS Interface).
https://www.paypal.com/us/webapps/mpp/payflow-payment-gateway
Apache License 2.0
47 stars 22 forks source link

Handle recurring payments starting with pn_result > 1 #20

Closed tcarobruce closed 5 years ago

tcarobruce commented 5 years ago

PayFlow Pro does not return recurring payments older than five years. So, for old recurring subscriptions, the first recurring payment returned by the API won't start at pn_result1.

Since the while loop ends as soon as a pn_result\d is found, it never finds any recurring payments for these old subscriptions.

This change fixes parse_parameters to search over all pn_result\d items and process each in order.

bkeating commented 5 years ago

Thank you very much for this contribution. It took me awhile to get things set up to review this locally.