laravel-paystack-subscription icon indicating copy to clipboard operation
laravel-paystack-subscription copied to clipboard

fix error when saving authorization code and getting plan code. Chang…

Open PaulChase opened this issue 3 years ago • 1 comments
trafficstars

An error is thrown when getting athorization code from the subscription data returned. here is the new format of subscription data returned.

"customer": 96698996
  "plan": 123456
  "integration": 123456
  "domain": "test"
  "start": 1234567890
  "status": "active"
  "quantity": 1
  "amount": 150000
  "authorization": 123456789
  "invoice_limit": 0
  "split_code": null
  "subscription_code": "SUB_qwertyuio"
  "email_token": "qwertyuiopl"
  "id": 123456
  "cancelledAt": null
  "createdAt": "2022-09-29T11:16:00.185Z"
  "updatedAt": "2022-09-29T11:16:00.185Z"
  "cron_expression": "16 11 28 * *"
  "next_payment_date": "2022-10-28T11:16:00.000Z"

note: some values above are dummy values (for security purposes).

major changes are authorization and plan properties, which are integers not objects.

PaulChase avatar Sep 29 '22 11:09 PaulChase

Hi, @PaulChase thanks for the pull request. Could you check the failing tests?

timoladoyinbo avatar Sep 29 '22 12:09 timoladoyinbo