mage2pro / alphacommercehub

AlphaCommerceHub integration with Magento 2
https://upwork.com/fl/mage2pro
MIT License
0 stars 2 forks source link

AlphaHPP 3D Secure: «Request failed, format error: TxnDetails» #6

Closed dmitrii-fediuk closed 7 years ago

dmitrii-fediuk commented 7 years ago

01

dmitrii-fediuk commented 7 years ago

HTTP data

General

Request URL:https://hubuat.alphacommercehub.com.au/pp/3dsecure
Request Method:POST
Status Code:200 OK
Remote Address:76.12.61.237:443
Referrer Policy:no-referrer-when-downgrade

Response

HTTP/1.1 200 OK
Date: Sat, 04 Nov 2017 04:50:42 GMT
Server: Microsoft-IIS/8.5
Cache-Control: private
Content-Type: application/json; charset=utf-8
X-AspNetMvc-Version: 4.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 1316
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Request

POST /pp/3dsecure HTTP/1.1
Host: hubuat.alphacommercehub.com.au
Connection: keep-alive
Content-Length: 3031
Pragma: no-cache
Cache-Control: no-cache
Origin: https://hubuat.alphacommercehub.com.au
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
X-APC-PPSessionId: 9376ae16-1fbd-412f-aae4-1520bbb8a165
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
X-APC-MerchantTxnID: 10.27L.699
X-Requested-With: XMLHttpRequest
Referer: https://hubuat.alphacommercehub.com.au/pp/ac580978-81f0-4716-bfc3-3bc46eab8603
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: __RequestVerificationToken=n-B5epNpZExPBpdLRWY_IOg_zxlnxkKjL1utioq1JrxE6rgCQN9BJ480lFpp8mWnGdzLeRMhjjnUk-PHF_BJBywBGWw7qNJYr6zSdMzZPcjvYobCiCRY5Eyc2vjI9cd0Pdv0_Q2; _timeZoneOffset=180; _ga=GA1.3.685466192.1508711293; ASP.NET_SessionId=t52lxugwamfcwzz4nkbj4l3e; .ASPXAUTH=7E9BA8D677CB26036A6D42F3A8C60897BFADDF06E0BF703C83315489CCB9835DBAE1C06373246AE1D06A0248B2D02FF68D434CEC2B9E04120F095087962E4FEE27AC9D701AAA1AF9A7C6DE7BEF8F616EEB2C74EF5646393F9ED60F9581E099CDAC872F98005890ABE685B81D4774894D832D05D7FBBC3E598A22CF1820B4F0BC76D1961B91932AFE6BA58ABE525F3A119415598E04A0B3B22181DC22A569FAD38706B938432610B0BB90E784003DD5BE9BFB5537; email=admin%40mage2.pro

Form data

cardHolder:DMITRY FEDYUK
cardNumber:5313 5700 0000 0011
cardExpiryDate:07 / 2020
cardCVV:123
country:AU
street1:72 Liverpool St
street2:
city:Sydney
zip:2000
emailAddress:
token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXlsb2FkIjoie1wiVXNlcklkXCI6XCIxMjNcIixcIk1lcmNoYW50SURcIjpcIkFOVEVSSU9SMDAxXCIsXCJNZXJjaGFudFR4bklEXCI6XCIxMC4yN0wuNjk5XCIsXCJDdXJyZW5jeVwiOlwiVVNEXCIsXCJBbW91bnRcIjpcIjEyNzAwMFwiLFwiVHJhbnNhY3Rpb25UaW1lc3RhbXBcIjpudWxsLFwiTWV0aG9kXCI6XCJDQ1wiLFwiTGFuZ3VhZ2VcIjpcImVuXCIsXCJUeG5EZXRhaWxzXCI6XCJBbGxpZ2F0b3IgQnJpZWZjYXNlICgyKSwgTmV3IFZlcnkgUHJpdmVcIixcIkNhcHR1cmVcIjpcIllcIixcIkVtYWlsQWRkcmVzc1wiOlwiZGZlZGl1a0BnbWFpbC5jb21cIixcIklQQWRkcmVzc1wiOlwiOTIuMjQzLjE2Ni44XCIsXCJUZWxOb1wiOlwiNjEyODI2ODg4ODhcIixcIkN1c3RvbWVySURcIjpcImRmZWRpdWtAZ21haWwuY29tXCIsXCJTb2NpYWxJRFwiOlwiNzQwNDE4MDM2ODNcIixcIlN0cmV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ab8603
merchantSequenceNumber:
clientIP:92.243.166.8
dmitrii-fediuk commented 7 years ago

04

dmitrii-fediuk commented 7 years ago

Request failed, format error: TxnDetails

02

dmitrii-fediuk commented 7 years ago

My TxnDetails is: «Alligator Briefcase (2), New Very Prive». What is wrong with it?

The TxnDetails parameter is documented here: https://mage2.pro/t/4852

dmitrii-fediuk commented 7 years ago

I made another payment transaction to document my initial payment request to https://hubuat.alphacommercehub.com.au/pp/ac580978-81f0-4716-bfc3-3bc46eab8603

HTTP data

General

Request URL: https://hubuat.alphacommercehub.com.au/pp/ac580978-81f0-4716-bfc3-3bc46eab8603
Request Method: POST
Status Code: 200 OK
Remote Address: 76.12.61.237:443
Referrer Policy: no-referrer-when-downgrade

Response

HTTP/1.1 200 OK
Date: Sat, 04 Nov 2017 05:40:22 GMT
Server: Microsoft-IIS/8.5
Cache-Control: private
Content-Type: text/html; charset=utf-8
X-AspNetMvc-Version: 4.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 4903
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Request

POST /pp/ac580978-81f0-4716-bfc3-3bc46eab8603 HTTP/1.1
Host: hubuat.alphacommercehub.com.au
Connection: keep-alive
Content-Length: 1122
Pragma: no-cache
Cache-Control: no-cache
Origin: https://localhost.com:900
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://localhost.com:900/store/checkout/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: __RequestVerificationToken=n-B5epNpZExPBpdLRWY_IOg_zxlnxkKjL1utioq1JrxE6rgCQN9BJ480lFpp8mWnGdzLeRMhjjnUk-PHF_BJBywBGWw7qNJYr6zSdMzZPcjvYobCiCRY5Eyc2vjI9cd0Pdv0_Q2; _timeZoneOffset=180; _ga=GA1.3.685466192.1508711293; ASP.NET_SessionId=t52lxugwamfcwzz4nkbj4l3e; .ASPXAUTH=7E9BA8D677CB26036A6D42F3A8C60897BFADDF06E0BF703C83315489CCB9835DBAE1C06373246AE1D06A0248B2D02FF68D434CEC2B9E04120F095087962E4FEE27AC9D701AAA1AF9A7C6DE7BEF8F616EEB2C74EF5646393F9ED60F9581E099CDAC872F98005890ABE685B81D4774894D832D05D7FBBC3E598A22CF1820B4F0BC76D1961B91932AFE6BA58ABE525F3A119415598E04A0B3B22181DC22A569FAD38706B938432610B0BB90E784003DD5BE9BFB5537; email=admin%40mage2.pro

Form data

Amount: 127000
CancelURL: https://mage2.pro/sandbox/dfe-alphacommercehub/customerReturn
Capture: Y
City: Sydney
Country: AU
Currency: USD
CustomerID: dfediuk@gmail.com
EmailAddress: dfediuk@gmail.com
FraudCheckBypass: N
IPAddress: 92.243.166.8
Language :en
MerchantDescriptor: Mage2.PRO
MerchantID: ANTERIOR001
MerchantTxnID: 10.27L.700
Method: CC
OrderDetails[0][ItemAmount]: 36000
OrderDetails[0][ItemName]: Alligator Briefcase
OrderDetails[0][ItemQuantity]: 2
OrderDetails[0][ItemTaxExempt]: TRUE
OrderDetails[1][ItemAmount]: 45000
OrderDetails[1][ItemName]: New Very Prive-41-Black
OrderDetails[1][ItemQuantity]: 1
OrderDetails[1][ItemTaxExempt]: TRUE
OrderDetails[2][ItemAmount]: 10000
OrderDetails[2][ItemName]: Shipping
OrderDetails[2][ItemQuantity]: 1
OrderDetails[2][ItemTaxExempt]: TRUE
SocialID: 74041803683
State: Mage2.PRO
Street1: 72 Liverpool St
SuccessURL: https://mage2.pro/sandbox/dfe-alphacommercehub/customerReturn
TelNo: 61282688888
TxnDetails: Alligator Briefcase (2), New Very Prive
UserId: 123
Zip: 2000

I have got the following form: 01

Then, I filled it, and pressed the «Submit» button: 02

It reproduces the initial error.

dmitrii-fediuk commented 7 years ago

Passing an empty string as TxnDetails does not help, still get the «Unable to process payment. Please confirm your information and try again.» message.

03

dmitrii-fediuk commented 7 years ago

The payment attempts directly from the AlphaCommerceHub merchant interface fails too:

magento2_alpha_commerce_hub_-_2017-11-04_10 48 14

launch_alpha_commerce_hub_-_2017-11-04_10 48 44

01

dmitrii-fediuk commented 7 years ago

Today I have got a response from the AlphaCommerceHub team:

This field is only accepting alphanumerics. The brackets are not supported. We will look to extend this field for special characters but for now please remove the brackets and comma from your test string

dmitrii-fediuk commented 7 years ago

[AlphaCommerceHub] What is the full set of characters treated as «alphanumeric» in the specification?

dmitrii-fediuk commented 7 years ago

It solves the problem: https://github.com/mage2pro/alphacommercehub/issues/6#issuecomment-343819287