Kiran
Kiran

Reputation: 8538

Set Recurring payment with different initial payment in Paypal

I am developing a payment option in a PHP based application. The user can choose Paypal or Paypal recurring method to make a payment.

However, the user would pay $50 for the first time and $40 starting from next month.

However, when the user chooses the Paypal recurring option and he pays $50, Paypal automatically chooses $50 from the next month onwards.

Is it possible to set the different initial payment and recurring payment ?

Here is the part of the code :

echo "<input type=\"hidden\" name=\"no_shipping\" value=\"1\"/>\n";
        echo "<input type=\"hidden\" name=\"a3\" value=\"".$amt."\"/>\n";
        echo "<input type=\"hidden\" name=\"p3\" value=\"1\"/>\n";
        echo "<input type=\"hidden\" name=\"t3\" value=\"M\"/>\n";
        echo "<input type=\"hidden\" name=\"src\" value=\"1\"/>\n";
        echo "<input type=\"hidden\" name=\"sra\" value=\"1\"/>\n";
        echo "<input type=\"hidden\" name=\"no_note\" value=\"1\"/>\n";

Thanks

Kiran

Upvotes: 0

Views: 218

Answers (1)

Nauphal
Nauphal

Reputation: 6182

Using paypal NVP API for PHP, you can send the initial payment to paypal like this.

$nvpstr="&AMT=10&CREDITCARDTYPE=$creditCardType&ACCT=$creditCardNumber&EXPDATE=".         $padDateMonth.$expDateYear."&CVV2=$cvv2Number&FIRSTNAME=$firstName&LASTNAME=$lastName&STREET=$address1&CITY=$city&STATE=$state".
"&ZIP=$zip&COUNTRYCODE=US&CURRENCYCODE=$currencyCode&PROFILESTARTDATE=$profileStartDate&DESC=$profileDesc&BILLINGPERIOD=$billingPeriod&BILLINGFREQUENCY=$billingFrequency&TOTALBILLINGCYCLES=$totalBillingCycles&INITAMT=30.00";


$resArray=hash_call("CreateRecurringPaymentsProfile",$nvpstr);

parameter INITAMT specifies the initial payment amount

Upvotes: 0

Related Questions