PHP Paypal Recurring PayPro Flow

I spend several day to figure our Paypal Recurring PayPro Flow Payment API.
But finally managed to create something cool with a class. I would like to share with you guys.

Why Paypal Recurring PayPro Flo ?
Companies want to charge there customers on monthly basics for different services that’s why its called Recurring. With PayPro Flow Payment API it become smooth and as a advantage user/customer does not leave site while making payment. Paypal will charge you $30 per month to create this account with PayPro Flow Payment system. This is where you can see everything related to your account.
In order to activate Recurring you need to make phone call to Paypal account manger and request them to enable Recurring then only it will work.

Code and examples –
This class “PayFlowTransaction.class.php” have everything you need.
Apart from that there is one more file, which you will be using to pass your form variables and it will show you result. So called instance!

What you can do with this class and code –
1. Create Recurring Billing Profile
2. Modify – Recurring Billing Amount and CC detials or anything
3. Reactivate – Reactivate Cancelled profile.
4. Cancel – You can cancel profile anytime
5. Inquiry – Details of each payment for a profile and Status of a customer’s profile
6. Payment – Retry a previously failed payment
You have to just pass correct variable and look litte bit in this documentation
In order to see this code in action you need to have your own account.

$txn->PARTNER = ‘PayPal’; // this is default
$txn->USER = ‘your_username’;
$txn->PWD= ‘You_should_ask_to_admin’;
$txn->VENDOR = ‘yourvendername_checkwith_your_admin’; //$txn->USER; //or your vendor name



Code above is very easy to understand.

//ini_set(‘display_errors’, 1);
//ini_set(‘log_errors’, 1);
//ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’);
// error_reporting(E_ALL);

this is to show error if you have any.
and rest of them are variables.

Hope it will cut down your development time.


One thought on “PHP Paypal Recurring PayPro Flow

  1. Shailesh

    very good but if you want to update credit card detail it takes all junk value like credit no. == ## …
    any solution for this

Leave a Reply

Your email address will not be published. Required fields are marked *