0
votes

I have created a paypal recurring payment with a trial period of 1 month. I am testing with my sandbox account.

After completing 1 payment I can see in my sandbox merchant account that the recurring payment has been created. But it's displaying: "recurring cycle remaining 1 month" and I have received $0. I mean the recurring payment has been started, but I am not receiving the money.

Is that paypal's fault or is there a problem with my code?

Well I am using a CMS(Social Eninge) . Paypal has been integrated here already . So I am just modifying it. Here is the parameters I am sending.

// This Portion to display the payment summery :
 $params['driverSpecificParams']['PayPal'] = array(
    'ITEMCATEGORY'=> 'Digital',
    'AMT' => $params['price'],
    'NAME' => $package->title,
    'DESC' => $desc,
    'ITEMS' => array(
      array(
        'NAME' => $package->title,
        'AMT' => $params['price'],
       'QTY' => 1,
      ),
    ),
    'BILLINGTYPE' => 'RecurringPayments',
    'BILLINGAGREEMENTDESCRIPTION' => $desc,
  );

 // And this portion for payment subscription.
    $rpData = array(
        'TOKEN' => $params['token'], 
        'PROFILEREFERENCE' => $order->order_id,
        'PROFILESTARTDATE' => $data['TIMESTAMP'],
        'DESC' => $desc, //Item Description
        'BILLINGPERIOD' => ucfirst($package->recurrence_type), 
        'BILLINGFREQUENCY' => $package->recurrence,
        'INITAMT' => 0 ,
        'TRIALBILLINGPERIOD' => ucfirst($package->recurrence_type),
        'TRIALBILLINGFREQUENCY' => $package->recurrence,
        'TRIALTOTALBILLINGCYCLES' => 1,
        'TRIALAMT' => $_SESSION["price"],
        'AMT' => $package->price,
        'CURRENCYCODE' => $this->getGateway()->getCurrency(),
      );

I would also like to know whether setting $0 for a few months in my trial period will work or not ?

Paypal displaying like this : [1]: https://i.stack.imgur.com/mSxk1.png

1
"is there a problem with my code": post your code then people can check whether there is something wrong with it...Risadinha
Thank you for your attention. I have added few it's a huge code can't add all.Ishaque Javed

1 Answers

0
votes

Well, I have found my code is right. It's paypal's delay for few hours.

Also setting $0 for trial period works perfectly. Trial period automatically choose the starting interval. You need to pass for how many days ,months, year, or week you wanna offer trial and which price, it might be lower price or zero doesn't matters.Like I am offering 1st month free/some reduced price after that it will continue the normal price.