Closed ketannsangani12 closed 7 years ago
Hello,
to be able to help you,i need your Merchant ID.
I checked service log of your trying, you havn´t generate keys, right? You must generate testing keys for your merchant id here: https://iplatebnibrana.csob.cz/keygen/ and download bank public key here: https://github.com/csob/paymentgateway/tree/master/keys Instructions, steb by steb are available here(in English): https://github.com/csob/paymentgateway/wiki/eAPI-v1.7-EN#integration-process-keys-and-where-to-get-them You are blocked in production environment, so set up url of payment gateway: https://iapi.iplatebnibrana.csob.cz/api/v1.6
I have both public and private keys.I am using version 1.7 not 1.6 and my merchant id is A2817KXBaz
I still seeing message: merchant key for M1MIPS1716 not found, it means error with keys. Are you sure you forwarded your public key to the bank when generated? Or Downloading right file of bank public key(mips_iplatebnibrana.csob.cz.pub)?? If not, please generate keys again, forward your public key to the bank(press button) and try. Should be work correctly.
Sorry my merchant id is A2817KXBaz and tell me i have got one public key name rsa_A2817KXBaz.pub and one private key rsa_A2817KXBaz.key.I am confusing in this.again i am asking i am using v1.7 not 1.6
You have anonymous ID, which can be used only in testing environment. Testing payment gateway has latest version api 1.6. ***.key is for woocommerce plugin.
New merchant ID is A2819fVRxG. Public key has been submitted. I have downloaded your repository and check examples in which signature generated with the use of **.key.Help me please still get error 400
atleast please help how can i debug it mate?
You have bad signature now. This can happened from more reason. You send "closePayment": false, can you try set up "closePayment": 0
yes i have tried that mate still not working
with these setup looking OK on my side, but now i can see you send "closePayment": false again, can you send same code unchanged, only set up "closePayment": 0
This is my whole implementation please check and let me know what is the issue please?
thank you for file. You using woocommerce plugin? I tried your merchant ID and your key in woocommerce plugin and all did well. I add my code to inspire you. A2819fVRxG.txt
no i am not using woocommerce i want simple payment method
anything need to change in code?please tell me
how can i solve error in my code mate?Please check my code mate?Please help me
in your file CSOB/sign-verify-test you have invalid merchand ID and public key. If you using this for generate signature, can be problem. Can you fix and try again?
this file not used to generate signature its generated from crypto.php.Mate please check my code?Have you skype?Can we discuss over it?its better i think
can you add screen from your client? (settings etc...)
You have still bad signature. Can you delete old key from your key folder?(rsa_A2817KXBaz.* and mips_platebnibrana.csob.cz) also set ""closePayment": 0.
still not working mate. I don't know.I am trying to resolve from morning and here now its evening
deleted old keys? and can you add screen from your client?
yes deleted wait i will give you
Hello,
Please check attachments and let me know
well, this is POSMERCHANT(in production environment, you should sign in testing environment here: https://iposman.iplatebnibrana.csob.cz), i think screen from your e-shop. POSMERCHANT is for merchant to check his transaction. NOT for create transaction. All day we talk about merchant ID A2819fVRxG and you now send screen for M1MIPS1716. Keys for A2819fVRxG are NOT SAME like keys for M1MIPS1716(must generate here: https://iplatebnibrana.csob.cz/keygen/ insert merchantID: M1MIPS1716 and email: tomas.jankuj@trv.cz) Store private and public key and forward public key to bank(button "odeslat veřejný klíč do banky") Replace your old key for this new in your e-shop.
okay i am developer and previous key given by client and also did not give access before this.Once again sorry for this.Let me try with this.
Thank you very much
Please check both above screens 1st from https://posman.csob.cz and 2nd from https://iposman.iplatebnibrana.csob.cz and 3rd from https://iposman.iplatebnibrana.csob.cz users information.
When i am trying to generate keys with robert.kvapil@trv.cz and merchant id M1MIPS1716 it gives me error invalid merchant id or email. When i am trying to generate keys with tomas.jankuj@trv.cz and merchant id M1MIPS1716 keys successfully generated.Then i have sent public key to bank and implement it in my code but still my code is not working.I dont know why?
I don´t know, what are you trying now? Let´s start from begining. Can you try "echo" using merchantID and keys for M1MIPS1716. Examples here: https://github.com/csob/paymentgateway/wiki/eAPI-v1.7-EN#getpost-httpsapiplatebnibranacsobczapiv17echo-
i have tried with echo with v 1.6 its giving me 404 error and with 1.7 its giving me 400 error
this is example for production environment. U are in TESTING environment. Must use echo for https://iapi.iplatebnibrana.csob.cz/api/v1.6/echo
Huhhhh got a response
{"dttm":"20171015063622","signature":"QLckyR8pPVBSsYPleXPeFdPhDgwmvj3TFQRNZDLDcJAF+VA+gDPg/NxC+syBu5pa+yLp+woa2XfKKNetCDXB/xdTdeQJk1GBfIGQ+0svXQUjhjuAAZF2gDvfG9g01clqZRz4vIVeteBMfTM33ccxkVOQ1VaTal0e/w4b9r7E5YF86gituZG78E6fi+6sIYgJgCpqTV4sc7dcCh1C9GFP6ynXs4aOPhEfLU/lvPoUAy2Zzwbsp1DoNXPKsCAD2PrxX0jz7CW61GbWPZqKEeCtSY4rs93fhkJHxD56+FsjdcSUlA+qnu9evJ2gYmDn80CiK68pEXivnstB/QmuRLk5/Q==","resultCode":0,"resultMessage":"OK"}
now please tell me what should i do?
well done :-) now you can try payment/init (https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init...) with your data (merchantID, returnUrl etc...), example from GitHub:
curl -v –X POST https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init \ -H "Content-Type:application/json" \ -d '{ "merchantId":"012345", "orderNo":"5547", "dttm":"20140425131559", "payOperation":"payment", "payMethod":"card", "totalAmount":1789600, "currency":"CZK", "closePayment": true, "returnUrl":"https://yourshop.com/gateway-return", "returnMethod":"POST", "cart":[ { "name": "Purchase on yourshop.com", "quantity": 1, "amount": 1789600, "description":"Lenovo ThinkPad Edge E540" }, { "name": "Shipping", "quantity": 1, "amount": 0, "description": "DHL Express" } ], "description":"Purchase on yourshop.com (Lenovo ThinkPad Edge E540, DHL Express)", "merchantData":"some-base64-encoded-merchant-data", "language":"CZ", "signature":"base64-encoded-signature-of-payment-request" }'
{
"merchantId":"M1MIPS1716",
"orderNo":"123456",
"dttm":"20171015070931",
"payOperation":"payment",
"payMethod":"card",
"totalAmount":100,
"currency":"CZK",
"closePayment":true,
"returnUrl":"http:\/\/localhost\/csob\/return.php",
"returnMethod":"POST",
"cart":[
{
"name":"Shopping at ...",
"quantity":1,
"amount":100,
"description":"Lenovo ThinkPad Edge E540..."
},
{
"name":"Shipping",
"quantity":1,
"amount":0,
"description":"PPL"
}
],
"description":"N\u00e1kup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)",
"merchantData":null,
"customerId":"1234",
"language":"CZ",
"signature":"NEv+\/DXAb2IKHzLhX1pE9cBH7qXnKRkMUZMKUPBb45yinpD0akVIlqWLDIH6J66hNxhZIH2A2cmQ9JH1FSvlmKtYK6nmAQx3mTEBOC5jEdkihnCBHQX\/YydhyF6m6bziotXYsPtbUxHmt7ogzVj5oxl8ShKUkIeWRMc5Gb5p23OMtSyZlPJM2jgK4plsLEzFWiKISpITzxR32dcR3vbVGRcfXTmCZKl7yNzgQmwKTzIWFyNWil0Ft2X5BsePz54u45Q2d5ci4iF+pDtlatYDq2HxcA\/uOhsTWeZlprf7b\/qkKMoEPCffYl998guxP6mtWegcP3M420OiOxxWNCEz3w=="
}
I am trying but still getting error 400 response
can you try replace this for example I wrote above? with your MerchantID etc ??
I have tried with same only merchantData is null but its not mandatory so this should work but still not worked
{
"merchantId":"M1MIPS1716",
"orderNo":5547,
"dttm":20140425131559,
"payOperation":"payment",
"payMethod":"card",
"totalAmount":1789600,
"currency":"CZK",
"closePayment":true,
"returnUrl":"https:\/\/yourshop.com\/gateway-return",
"returnMethod":"POST",
"cart":[
{
"name":"Purchase on yourshop.com",
"quantity":1,
"amount":1789600,
"description":"Lenovo ThinkPad Edge E540"
},
{
"name":"Shipping",
"quantity":1,
"amount":0,
"description":"DHL Express"
}
],
"description":"Purchase on yourshop.com (Lenovo ThinkPad Edge E540, DHL Express)",
"language":"CZ",
"signature":"Q+J9Dw7roP7p6lzLojocs3zFi2OJn50CmKMJbw6DAEYX0mD4UV8JujfW8H58Mh\/vfjC8tCCIBBnE6tgH6P8I5iohb\/RpNC+re8LvP5UJwBvhPmN1RSOaseTriXFKU4XhiJtlvU6liGqQPbTOWZtN3pl2todZuYx5BAhg22Fpotnn4SED2x1Dj4sGJdU3vDKJfYX0pSuS10Qqs47bu6cZGgkb8UBpLkTiC7uhyxnLiWjs7wIqaxF0KFbwLA0Q\/j9Mu2C4F4tVCI8+oJ9BuBlr3Y4P6FhNYZpSkj+aBRF0TvhQfU4UTPEsFJ8ns0I7pA34OVYkSmC0\/hYcZmkh+qvgSA=="
}
you have still the same problem with signature. I don´t know how you generated it. But you must have a valid "returnUrl" parameter, "https://yourshop.com/gateway-return" is example and doesn´t exist. Can you try this with valid MerchantID and returnUrl of your eshop. Also can you try set up "closePayment": 0
https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init \ -H "Content-Type:application/json" \ -d '{ "merchantId":"012345", "orderNo":"5547", "dttm":"20140425131559", "payOperation":"payment", "payMethod":"card", "totalAmount":1789600, "currency":"CZK", "closePayment": true, "cart":[ { "name": "Nákup: vasobchod.cz", "quantity": 1, "amount": 1789600, "description":"Lenovo ThinkPad Edge E540" }, { "name": "Poštovné", "quantity": 1, "amount": 0, "description": "Doprava PPL" } ], "description":"Nákup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)", "merchantData":"some-base64-encoded-merchant-data", "language":"CZ", "returnUrl":"https://vasobchod.cz/gateway-return", "returnMethod":"POST", "signature":"base64-encoded-signature-of-payment-request" }'
I have used same method which used in Echo API following are data to create signature which generated with pipes as documentation please check anything wrong: ''M1MIPS1716|5547|20140425131559|payment|card|1789600|CZK|0|http://localhost/csob/return.php|POST|Purchase on yourshop.com|1|1789600|Lenovo ThinkPad Edge E540|Shipping|1|0|DHL Express|Purchase on yourshop.com (Lenovo ThinkPad Edge E540, DHL Express)|CZ''
"http://localhost/csob/return.php" doesn´t exist, enter a valid adress from my last example must be string data for generate like this: "012345|5547|20140425131559|payment|card|1789600|CZK|true|https://vasobchod.cz/gateway-return|POST|Nákup: vasobchod.cz|1|1789600|Lenovo ThinkPad Edge E540|Poštovné|1|0|Doprava PPL|Nákup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)|some-base64-encoded-merchant-data|CZ" but with your specific data like merchantID, returnUrl so you can compare.
its on my local server pc mate so url is type of that
OK, I am sorry, but you still havn´t valid signature. Can you try this:
https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init -H "Content-Type:application/json" -d '{ "merchantId":"M1MIPS1716", "orderNo":"5555", "dttm":"20171015121559", "payOperation":"payment", "payMethod":"card", "totalAmount":1789600, "currency":"CZK", "closePayment": 0, "cart":[ { "name": "Nákup: vasobchod.cz", "quantity": 1, "amount": 1789600, "description":"Lenovo ThinkPad Edge E540" }, { "name": "Poštovné", "quantity": 1, "amount": 0, "description": "Doprava PPL" } ], "description":"Nákup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)", "merchantData":"some-base64-encoded-merchant-data", "language":"CZ", "returnUrl":"http://localhost/csob/return.php", "returnMethod":"POST", "signature":"base64-encoded-signature-of-payment-request" }'
with these string for signature: "M1MIPS1716|5555|20171015121559|payment|card|1789600|CZK|0|http://localhost/csob/return.php|POST|Nákup: vasobchod.cz|1|1789600|Lenovo ThinkPad Edge E540|Poštovné|1|0|Doprava PPL|Nákup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)|some-base64-encoded-merchant-data|CZ"
code in BASE64_ENCODE(RSA_SIGN(string above))
then i check sevice log.
Yes i have already used that please check below screenshot
I saw in service log you still trying orderNo: 5547, can you set up example from my last comment?
Still not working please check
i checked, you dont use all parameters, i saw you didn´t set up actual "dttm" and "closePayment":0, can you repair and run?
Now check please i did not send only merchantData other params as your example
Hello, Try to send "orderNo": 5555 as string ---> "orderNo": "5555", I see that you are sending it with number value.
Also check if u are using https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init instead of https://iapi.iplatebnibrana.csob.cz/api/v1.6/payment/init/
Still not working order no sent as string
Please help me how can i resolve this?It is difficult to find what is the exact problem?
Hi,
I am using eApi 1.7 for payments and send all data as described in documentation and stated that
This is my input json : {
"merchantId":"M1MIPS1716", "orderNo":"123456", "dttm":"20171014101019", "payOperation":"payment", "payMethod":"card", "totalAmount":100, "currency":"CZK", "closePayment":"false", "returnUrl":"http:\/\/localhost\/csob\/return.php", "returnMethod":"POST", "cart":[
{
"name":"Shopping at ...", "quantity":1, "amount":100, "description":"Lenovo ThinkPad Edge E540..." }, {
"name":"Shipping", "quantity":1, "amount":0, "description":"PPL" } ], "description":"N\u00e1kup na vasobchod.cz (Lenovo ThinkPad Edge E540, Doprava PPL)", "merchantData":null, "customerId":"1234", "language":"CZ", "signature":"Fog6OUGMPMytONBmeBnlFDbA4fU+\/ak3MBWeDimWbCWbuamzAc\/FUEWZrlnKXnDAaxKKhmhwPwffveUcSUzgrKQfl58j6iUdBtC\/NSRqgcfk3n42Qty5b+ymQ5EToYSSYg6UQVENfUiFWYtDjAUhR6g24Q4LOZC6JQmZ4bz\/loHTOSnLXVqBHYrqV8Rxrn+y1xrPg6YisZf2icAxNgi90GDm3Z\/BHxt9kMgIpM8dgSyxqPrx1KD0RzKWogsEFs5kB03bVLzDL9Fuu6s2H8hnd9Mvge7oD6vjZCiyNGNxdZ7rm7VlqffyU9iDams9+\/qMy5P6m\/+ymE8tC0ydUL9CMw==" }
how can i verify these things?Please help me