Closed krunal131987 closed 9 years ago
Hi, it seems that totalAmount and also cart/amount fields contains invalid value 6.6, it must be integer number, must contain "amount in minor units of currency", i.e. 660 cents.
For more info see https://github.com/csob/paymentgateway/wiki/eAPI-v1-(English-version)
now getting 400 bed request error
my request is, {"returnUrl":"https:\/\/www.print-pix.eu\/functions\/csob_return_payment\/","cart":[{"amount":6,"description":"PrintPix - photos printing","quantity":1,"name":"Order of photos"}],"payOperation":"payment","dttm":"20150601142523","currency":"USD","merchantData":"Order of 1 photos","orderNo":"38","description":"PrintPix APP order 38","returnMethod":"POST","totalAmount":6,"closePayment":"true","merchantId":"A1050uj4XS","language":"EN","signature":"QTEwNTB1ajRYU3wzOHwyMDE1MDYwMTE0MjUyM3xwYXltZW50fGNhcmR8Ni42fFVTRHx0cnVlfFBy\naW50UGl4IEFQUCBvcmRlciAzOHxFTg==\n","payMethod":"card"}
Please check your settings (merchantId, URL of payment gateway, keys) in your e-shop. Do you want to use integration or production environment? Anonymous development (merchantId A1050uj4XS is available only in integration environment).
for more info please see https://github.com/csob/paymentgateway/wiki/eAPI-v1-(English-version)#integration-process-keys-and-where-to-get-them
i want to use it for integration environment, i just want to know, is there any mistake in my json request? is this error occur because of merchant id ?
JSON request looks fine (merchantId A1050uj4XS should be valid in this env)
then why i m getting 400 bad request error, and not getting any response from payment gatway
because of security (if core params are invalid - merchantId, signature, etc. - only 400 bad request is returned in response)
Once again, you tried to initialize payment with merchantId A1050uj4XS against production environment, please change URL of payment gateway entrypoint to integration env.
i am using this url https://api.platebnibrana.csob.cz/api/v1/payment/init, and for generating signature i just converted string of message_data in to base 64
this is my message_data, A1050uj4XS|40|20150601154040|payment|card|6|USD|true|PrintPix APP order 40|EN
this is base64 converted message_data QTEwNTB1ajRYU3w0MHwyMDE1MDYwMTE1NDA0MHxwYXltZW50fGNhcmR8NnxVU0R8dHJ1ZXxQcmlu dFBpeCBBUFAgb3JkZXIgNDB8RU4=
please tell me is there any wrong in to this.
URL endpoint of integration env is https://iapi.iplatebnibrana.csob.cz/api/v1/payment/init (note "i" in front of api and platebnibrana)
For more info see https://github.com/csob/paymentgateway/wiki/eAPI-v1-(English-version)
both URLs with "https://iapi.iplatebnibrana.csob.cz/api/v1/payment/init" and https://api.platebnibrana.csob.cz/api/v1/payment/init both giving same error 400 bad request
Your data to sign is invalid, there are missing required fields, like returnUrl, returnMethod and cart items like name, quantity and amount
A1050uj4XS|40|20150601154040|payment|card|6|USD|true|PrintPix APP order 40|EN
I am getting this error json while requesting for api "payment/init" {"resultCode":900,"resultMessage":"Internal error"}
here it is my request,
"Content-Type" : "application/json"
{"returnUrl":"https:\/\/www.print-pix.eu\/functions\/csob_return_payment\/","cart":[{"amount":6.6,"description":"PrintPix - photos printing","quantity":1,"name":"Order of photos"}],"payOperation":"payment","dttm":"20150601121853","currency":"USD","orderNo":"36","description":"PrintPix APP order 36","returnMethod":"POST","totalAmount":"6.6","closePayment":"true","merchantId":"A1050uj4XS","language":"EN","signature":"QTEwNTB1ajRYU3wzNnwyMDE1MDYwMTEyMTg1M3xwYXltZW50fGNhcmR8Ni42fFVTRHx0cnVlfFBy\naW50UGl4IEFQUCBvcmRlciAzNnxFTg==\n","payMethod":"card"}
Please help me out for this error