I'm not really familiar with PHP. I've been asked to add a recurring payment option to an already existing website that charges subscriptions to a magazine. Looking at the code I found this section:
$paypal = new Paypal('en');
$paypal->API_UserName = API_USERNAME;
$paypal->API_Password = API_PASSWORD;
$paypal->API_Signature = API_SIGNATURE;
$paypal->API_Endpoint = 'https://api-3t.paypal.com/nvp' ;
$paypal->lang_id = 'en';
$paypal->country_code = 'CA';
$paypal->operation = OPERATION;
$paypal->payment_type = PAYMENT_TYPE;
$paypal->email = $Subscription->email;
$paypal->firstname = $Subscription->first_name;
$paypal->lastname = $Subscription->last_name;
$paypal->address = $Subscription->address;
$paypal->city = $Subscription->city;
$paypal->state = $Subscription->province;
$paypal->zip = $Subscription->postal_code;
$paypal->ship_address = $paypal-> address;
$paypal->ship_firstname = $paypal-> firstname;
$paypal->ship_lastname = $paypal-> lastname;
$paypal->ship_city = $paypal-> city;
$paypal->ship_state = $paypal-> state;
$paypal->ship_country_code = $paypal-> country_code;
$paypal->ship_zip = $paypal-> zip;
$paypal->credit_card_type = POST( 'card_type' );
$paypal->credit_card_number = POST( 'card_number' );
$paypal->exp_month = POST( 'card_month' );
$paypal->exp_year = POST( 'card_year' );
$paypal->cvn = POST( 'cvn' );
$paypal->amount = number_format((float)$Subscription->total, 2);
//$paypal->items_amount = number_format((float)$Subscription->price, 2);
$paypal->shipping_amount = 0;
//$paypal->tax_amount = number_format((float)$Subscription->taxes, 2);
$paypal->currency_code = 'CAD';
$paypal->prepare_checkout_request();
$paypal->process_request();
$paypal->interpret_response();
Looking at the Paypal documentation I found these parameters that should add the recurring feature to the current payment:
PROFILESTARTDATE BILLINGPERIOD BILLINGFREQUENCY AMT
How could I fit these in the current structure to, for example, make it charge every 3 years?
Thanks for any info that could guide me!
PS, for this, do customers need a Paypal account? Or can they just put their credit card?