Search code examples
laravelpaypal-subscriptions

Laravel Paypal Recurring Payment - Wrong NextBillingDate - After Successful Payment


I had implemented paypal recurring payment in Laravel using below package http://github.com/srmklive/laravel-paypal#usage-ec-createrecurringprofile

I made a successful recurring payment for every Month. I got success response from paypal api. But when I call getRecurringPaymentsProfileDetails method of this package it will give me Wrong NextBillingDate

For example I am making successful payment On 31/July/2020. So next billingdate must be 30/Aug/2020. But it will giving same date in which I made a payment

I have attached response of getRecurringPaymentsProfileDetails if you look in below response PROFILESTARTDATE and NEXTBILLINGDATE are same which is wrong array:36

  "PROFILEID" => "I-A58X84HXXXXX"
  "STATUS" => "Active"
  "AUTOBILLOUTAMT" => "NoAutoBill"
  "DESC" => "Monthly Subscription  #47"
  "MAXFAILEDPAYMENTS" => "0"
  "SUBSCRIBERNAME" => "John Doe"
  "PROFILESTARTDATE" => "2020-07-31T07:00:00Z"
  "NEXTBILLINGDATE" => "2020-07-31T10:00:00Z"
  "NUMCYCLESCOMPLETED" => "0"
  "NUMCYCLESREMAINING" => "0"
  "OUTSTANDINGBALANCE" => "0.00"
  "FAILEDPAYMENTCOUNT" => "0"
  "TRIALAMTPAID" => "0.00"
  "REGULARAMTPAID" => "0.00"
  "AGGREGATEAMT" => "0.00"
  "AGGREGATEOPTIONALAMT" => "0.00"
  "FINALPAYMENTDUEDATE" => "1970-01-01T00:00:00Z"
  "TIMESTAMP" => "2020-07-31T07:19:47Z"
  "CORRELATIONID" => "4c5309f17b1a7"
  "ACK" => "Success"
  "VERSION" => "123"
  "BUILD" => "54677068"
  "BILLINGPERIOD" => "Month"
  "BILLINGFREQUENCY" => "1"
  "TOTALBILLINGCYCLES" => "0"
  "CURRENCYCODE" => "USD"
  "AMT" => "3.99"
  "SHIPPINGAMT" => "0.00"
  "TAXAMT" => "0.00"
  "REGULARBILLINGPERIOD" => "Month"
  "REGULARBILLINGFREQUENCY" => "1"
  "REGULARTOTALBILLINGCYCLES" => "0"
  "REGULARCURRENCYCODE" => "USD"
  "REGULARAMT" => "3.99"
  "REGULARSHIPPINGAMT" => "0.00"
  "REGULARTAXAMT" => "0.00"
]

Solution

  • Recurring payments profiles bill in a batch, so the first "next billing date" will be within 24 hours of the initial checkout time.

    It is not wrong. This will be the first transaction of the recurring profile.