Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the correct format of paystack.chargeCard() #17

Closed
Tetranyble opened this issue Jun 26, 2020 · 7 comments
Closed

the correct format of paystack.chargeCard() #17

Tetranyble opened this issue Jun 26, 2020 · 7 comments

Comments

@Tetranyble
Copy link

I have been experiencing error in the chargeCard function with the following object as a parameter to the chargeCard function:

{
  "email":"some@body.nice",
  "amount":"10000",
  "metadata":{
    "custom_fields":[
      {
        "value":"makurdi",
        "display_name": "Donation for",
        "variable_name": "donation_for"
      }
    ]
  },
  "card":{
    "cvv":"408",
    "number":"4084084084084081",
    "expiry_month":"01",
    "expiry_year":"99"
  },
  "pin":"0000"
}

Source:
and here is the errror i get:

Error: Request was badly formed | Bad Request (400)
    at PayStack.httpClientBaseOptions.hooks.afterResponse (C:\xampp\htdocs\blake\node_modules\paystack-node\src\PayStack\index.js:331:21)
    at EventEmitter.<anonymous> (C:\xampp\htdocs\blake\node_modules\got\source\as-promise.js:39:23)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

and just to dig up thing i had to go into that file and console log at line 309 and here's what i got even after changing the card details to a real card:

body: '{\n  "status": false,\n  "message": "Please pass card number to charge"\n}'
@stitchng
Copy link
Owner

stitchng commented Jun 27, 2020

@Tetranyble Thanks for raising this issue. We will have someone look into it soon. However, i think this is an issue with the PayStack API itself

@Tetranyble
Copy link
Author

please do. we're at stand still in our project

@Tetranyble
Copy link
Author

@Tetranyble Thanks for raising this issue. We will have someone look into it soon. However, i think this is an issue with the PayStack API itself

so how can this be resolved at the moment?

@devamaz
Copy link
Collaborator

devamaz commented Jun 28, 2020

@Tetranyble Thanks for the feedback this is currently being resolved

@Tetranyble
Copy link
Author

This is taking too long to resolve

@stitchng
Copy link
Owner

@Tetranyble , please find the newest version of this package v.0.2.5 on npm. Your issue has been attended to. Please, letus know if you have anything more you would like us to look into.

Cheers

@stitchng
Copy link
Owner

Closing this issue out due to non-activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants