incubatehub / UPI-Sandbox-PSP-server-ruby

2 stars 0 forks source link

XML Payload has not been provided in input: Error_code : L08 #2

Open osparamatrix opened 4 years ago

osparamatrix commented 4 years ago

I have setup the dummy PSP on a system having a static ip and registered it with UPI Sandbox. While testing the Pay request via the PSP server, I initially faced issues with the PSP server response of 500 server error stating Header includes CRLF. So I removed these via online tools available and sent the request again. Now I received the response as stated below:-

{"success":true,"data":"\n\u003cupi:Ack xmlns:upi=\"http://npci.org/upi/schema\" api=\"ReqPay\" err=\"L08\" ts=\"2020-02-26T07:27:37+00:00\"/\u003e\n"}

Now the error code means:-

Error_code : L08

Message : XML Payload has not been provided in input

I checked the request logs in the UPI sandbox dashboard, and the request body is empty.

Also I checked the logs, but not much gets logged on success. If there some way to configure it. Kindly do share how to proceed with the same.

For your reference, the request format is as follows(But I have MASKED the details of the test accounts given for our PSP registered in UPI):-

{"api":"ReqPay","xml":"<upi:ReqPay xmlns:upi=\"http://npci.org/upi/schema/\"> <Head ver=\"1.0\" ts=\"2020-02-26T07:02:29+00:00\" orgId=\"MASKED\" msgId=\"MASKED\" /> <!-- Meta Info --> <Meta> <Tag name=\"PAYREQSTART\" value=\"\" /> <Tag name=\"PAYREQEND\" value=\"\" /> </Meta> <!-- --> <Txn id=\"0001\" note=\"\" custRef=\"\" refId=\"\" refUrl=\"\" ts=\"\" type=\"PAY|COLLECT|DEBIT|CREDIT|REVERSAL|REFUND\" orgTxnId=\"\" orgRespCode=\"\"> <RiskScores> <Score provider=\"sp\" type=\"TXNRISK\" value=\"\" /> <Score provider=\"npci\" type=\"TXNRISK\" value=\"\" /> </RiskScores> <Rules> <Rule name=\"EXPIREAFTER\" value=\"35\" /> <Rule name=\"MINAMOUNT\" value=\"\" /> </Rules> </Txn> <Payer addr=\"MASKED\" name=\"MASKED\" seqNum=\"\" type=\"PERSON|ENTITY\" code=\"\"> <Info> <Identity type=\"PAN|AADHAAR|ACCOUNT\" verifiedName=\"\" /> <Rating verifiedAddress=\"TRUE|FALSE\" /> </Info> <Device> <Tag Name=\"MOBILE\" value=\"MASKED\" /> <Tag Name=\"GEOCODE\" value=\"\" /> <Tag Name=\"LOCATION\" value=\"\" /> <Tag Name=\"IP\" value=\"\" /> <Tag Name=\"TYPE\" value=\"\" /> <Tag Name=\"ID\" value=\"MASKED\" /> <Tag Name=\"OS\" value=\"\" /> <Tag Name=\"APP\" value=\"\" /> <Tag Name=\"CAPABILITY\" value=\"\" /> </Device> <Ac addrType=\"AADHAAR\"> <Detail name=\"IIN\" value=\"\" /> <Detail name=\"UIDNUM\" value=\"MASKED\" /> </Ac> <Ac addrType=\"ACCOUNT\"> <Detail name=\"IFSC\" value=\"\" /> <Detail name=\"ACTYPE\" value=\"SAVINGS|CURRENT|DEFAULT\" /> <Detail name=\"ACNUM\" value=\"\" /> </Ac> <Ac addrType=\"MOBILE\"> <Detail name=\"MMID\" value=\"\" /> <Detail name=\"MOBNUM\" value=\"\" /> </Ac> <Ac addrType=\"CARD\"> <Detail name=\"ACTYPE\" value=\"SAVINGS|CURRENT\" /> <Detail name=\"CARDNUM\" value=\"\" /> </Ac> <Creds> <Cred type=\"AADHAAR\" sybType=\"IIR|FMR|FIR|OTP\"> <Data code=\"\" type=\"\" ki=\"\"> <!-- BASE 64 ENCODED/ENCRYPTED AUTHENTICATION DATA--> </Data> <Skey ki=\"\"></Skey> <Hmac></Hmac> </Cred> <Cred type=\"OTP\" sybType=\"SMS|EMAIL|HOTP|TOTP\"> <Data code=\"MASKED\" type=\"\" ki=\"\"> <!-- BASE 64 ENCODED/ENCRYPTED AUTHENTICATION DATA--> </Data> </Cred> <Cred type=\"PIN\" sybType=\"MPIN\"> <Data code=\"\" type=\"\" ki=\"\"> <!-- BASE 64 ENCODED/ENCRYPTED AUTHENTICATION DATA--> </Data> </Cred> <Cred type=\"CARD\" sybType=\"CVV1|CVV2|EMV\"> <Data code=\"\" type=\"\" ki=\"\"> <!-- BASE 64 ENCODED/ENCRYPTED AUTHENTICATION DATA--> </Data> </Cred> <Cred type=\"PreApproved\" sybType=\"NA\"> <Data code=\"\" type=\"\" ki=\"\"> <!-- BASE 64 ENCODED/ENCRYPTED AUTHENTICATION DATA, DATA INCLUDES respCode and approvalRef RES|A123554 , \"|\" to used as delimeter--> </Data> </Cred> </Creds> <Amount value=\"1\" curr=\"INR\"> <Split name=\"PURCHASE|CASHBACK\" value=\"\" /> </Amount> </Payer> <Payees> <Payee addr=\"MASKED\" name=\"MASKED\" seqNum=\"\" type=\"PERSON|ENTITY\" code=\"\"> <Info> <Identity type=\"PAN|AADHAAR|ACCOUNT\" verifiedName=\"\" /> <Rating verifiedAddress=\"TRUE|FALSE\" /> </Info> <Device> <Tag name=\"MOBILE\" value=\"MASKED\" /> <Tag name=\"GEOCODE\" value=\"12.9967,77.5567\" /> <Tag name=\"LOCATION\" value=\"Sarjapur road, Bangalore, KA, IN\" /> <Tag name=\"IP\" value=\"123.123.12.12\" /> <Tag name=\"TYPE\" value=\"\" /> <Tag name=\"ID\" value=\"MASKED\" /> <Tag name=\"OS\" value=\"Android 4.4\" /> <Tag name=\"App\" value=\"Test 1.0\" /> <Tag name=\"CAPABILITY\" value=\"011001\" /> </Device> <Ac addrType=\"AADHAAR\"> <Detail name=\"IIN\" value=\"\" /> <Detail name=\"UIDNUM\" value=\"MASKED\" /> </Ac> <Amount value=\"1\" curr=\"INR\"> <Split name=\"PURCHASE|CASHBACK\" value=\"\" /> </Amount> </Payee> </Payees> </upi:ReqPay> ","transaction_id":"0002"}

This is exactly what I send in the pay request body when I inspect in the dev tools. So is there an issue with the format in which I am sending or is it some issue with the PSP server itself ?