Payment bug validation and documentation

bug
payments

#1

Hi, just starting up.
Wanted to comment on something I went through.

problem

Importing to postman this curl it gets imported as a x-www-form-urlencoded body data type.

When making that request it returned a bad request with some information saying it needed a json type.

So I changed that type and in the body I puted this:

{
        "gateway": "stripe",
    	"method": "purchase",
    	"payment": "tok_visa"
}

This got a 500 response. But it was a bad request, just had to add the “data” field.

TL;DR

  1. curl on doc needs a json type header.
  2. backend needs a validation for missing “data” field.

images for clarifying

I can only upload one :slightly_frowning_face:


#2

Hi @norman

Thanks for taking the time to report this, I’ll make sure these issues get passed on to the relevant teams so we can get them fixed.

Thanks,
James