paystack icon indicating copy to clipboard operation
paystack copied to clipboard

Requesting autorization code when charging with card

Open Oluwatemilorun opened this issue 7 years ago • 7 comments

Hi I get this error when i try to charge with card Required Parameters Ommited - authorization_code

But according to paystack doc for charge, its not a required param when charging with card - https://developers.paystack.co/reference#charge

screen shot 2018-08-20 at 15 09 38

I'm i doing this wrong? Please help out.

Oluwatemilorun avatar Aug 20 '18 14:08 Oluwatemilorun

Just went through your code and disabled the default params check so i can proceed and i got another error { status: false, message: 'Invalid transaction reference' }

I discovered that the method Paystack.transaction.charge() has an endpoint of https://api.paystack.co/transaction/charge_authorization which is different from that on paystack docs https://api.paystack.co/charge

Oluwatemilorun avatar Aug 20 '18 15:08 Oluwatemilorun

@Oluwatemilorun Thanks for this issue! Please can you send in a PR to this effect?

subomi avatar Aug 26 '18 14:08 subomi

#30

@Subomi just did... check it out.

Oluwatemilorun avatar Aug 26 '18 21:08 Oluwatemilorun

@Oluwatemilorun There seems to be so much incompatibility with current code. Can you take some time to read current code so you can follow whats already avaliable. So we can test and merge this .

subomi avatar Aug 30 '18 14:08 subomi

@Subomi i just wrote a different module and attached it to the core paystack. Same implementation with all other resource. But can you please point out where the compatibility failed?

Oluwatemilorun avatar Aug 31 '18 05:08 Oluwatemilorun