简体   繁体   English

尝试通过 POST 请求向第三方支付网关提交支付:S

[英]Trying to submit a payment, to a 3rd party payment gateway, through POST request :S

I am mimicing a user buying a product on a website: www.footlocker.dk .我正在模仿用户在网站上购买产品: www.footlocker.dk All that works fine, the HTTP session adds the product to cart, submits delivery information and personal information.一切正常,HTTP session 将产品添加到购物车,提交送货信息和个人信息。 However I have gotten to the payment details field, like CardNumber, ExpireMonth, ExpireYear and CVC.但是,我已经进入了付款详细信息字段,例如 CardNumber、ExpireMonth、ExpireYear 和 CVC。 I can see this POST request being submitted in Fiddler, when I press the place order button manually.当我手动按下下订单按钮时,我可以看到这个 POST 请求正在 Fiddler 中提交。

However the values of my payment information have been encrypted by some javascript on the payment site, so I am unable to see, how they are submitted - that means I can not mimic this POST request in my own program, to finish the order.然而,我的支付信息的值已经被支付网站上的一些 javascript 加密,所以我无法看到它们是如何提交的——这意味着我无法在我自己的程序中模仿这个 POST 请求来完成订单。

The POST request that submits the payment looks like below:提交付款的 POST 请求如下所示:

SUBMITS TO ENDPOINT:提交到端点:

https://www.footlocker.dk/api/users/orders/adyen?timestamp=1611850342216

JSON POST-BODY: JSON 帖子主体:

{
  "preferredLanguage": "en",
  "termsAndCondition": true,
  "deviceId": "0400JapG4txqVP4Nf94lis1ztlZtWBcopyaUnrp/XmcfWoVVgr+Rt2dAZDBTRGtjJzbbaHjoci9mfzLNc/p/1y9PHkhCTHg+Ms0Qhlz5wlRFwWJi0FRulruXQQGCQaJkXU7GIVTlvSwewS7rEwtO20alTVOiwQNAcAt1k+2RqB7pLlm0Mm+WlZ9H3WRaXzrV/DlB6Yf0/pTJUUx5H73J7OWoNgydKgnOIDKXq4HnEqNOos1c6njJgQh/4vXJiqy0MXMQVHUZjFVALWCMcmjVhyuVdYFO8Jh9loc13GcXvYqG6g9/AoNntrnW1/EViOkl5oC/lU99UoH2xkmTfT0fHtASOVNpC3Z/r4RJ+FMEqKbpAljKJas3DjbfmNmLM17uWY0fNZvlMH4K2bNfq3bGwE2owA1ObvoNZBxkQ1iq1uTKn17MrJkKSmGA0t9uKT78fS9bB2GDXcjpghm9klVFOw7EoYzV7IDBIIRtOCWnMAmlqCrz6D+YNUMLEY530CaM8EgnYIxkTrOGlmKC/wYNvbPpWGE7VDaOZWB8Og9w7I7EUjZQzmeZ0haCTC7oH6vxOQu/JpQYAFUrDlcsqHxMRyMA3chuABxG1NyMp164XJzuFIDBKSaGqH8pKTFdh3l37CKXBlIOn3E5YIdc6njJgQh/4vXJiqy0MXMQOxLdmoenKqPRDDLX2e+wCZ1fN2xHc5V6RMvwb6Q2PAvL9kaL85lzU9YPUST3gTYnndnF9oBO0EuFJ7eNbvVobQHzj486sjgyUO+AInpd+UykzlhvKatVjmsNYyYk/ctdj9Vx2xW1nbvSIBfLN+R0M79MOnRTMthLnHsVWF4lmJwstDDhGcf4uznBcyAkSsy2uwLLNTE9qpz4XGNSvOUTVPP9hlwYbP0H7RDoeOmIGTKRUY1DfwxZZR8cFUL9uLsiABD7fKaFmF1HOvwyiaHWP/wYCL58YnyFO5CLi14h8zUnzqtbxtgjnzbD/ssFgrRT",
  "cartId": "8e02b07e-2a21-417d-b34b-06621164cec0",
  "encryptedCardNumber":xxx,
  "encryptedExpiryMonth":xxxx, 
  "encryptedExpiryYear":xxxx, 
  "paymentMethod": "CREDITCARD",
  "returnUrl": "https://www.footlocker.dk/adyen/checkout",
  "browserInfo": {
    "screenWidth": 1382,
    "screenHeight": 864,
    "colorDepth": 24,
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0",
    "timeZoneOffset": -60,
    "language": "da",
    "javaEnabled": false
  }
}

There are also cookies and headers being sent with this post request, however I am pretty understandable of those, so I am not going to paste them in here.还有 cookies 和标头随此发布请求一起发送,但我非常理解这些,所以我不打算将它们粘贴到此处。 What I am looking for is a way to figure out, how I can send this POST request, in my program, so my payment gets accepted by provider, and the product is ordered.我正在寻找的是一种方法来确定如何在我的程序中发送此 POST 请求,以便供应商接受我的付款,并订购产品。 I do not know how to go about this, when I cannot see how to form should look like, with my plain payment details, unencrypted.我不知道如何 go 关于这个,当我看不到表格应该是什么样子时,我的付款明细是未加密的。

Hope someone can help me shred som light onto this, and if anything else is needed from me, let me know!希望有人能帮我解决这个问题,如果我还需要什么,请告诉我!

Regards!问候!

Appears to be encrypting the data client-side.似乎正在加密客户端的数据。 Take a look at the Javascript files and find where it is being encrypted.查看 Javascript 文件并找到它的加密位置。

I recommend editing this post and removing the encrypted values.我建议编辑这篇文章并删除加密值。 It can be decrypted.它可以被解密。

That information is sended by the frontend maybe they are using the drop-in component to send back to the API该信息由前端发送,也许他们正在使用插入式组件发送回 API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从第三方 API(支付网关)重定向后丢失 session 数据 - Losing session data after redirecting from a 3rd party API (payment gateway) 将http请求发布到第三方服务器并通过重定向获取响应 - post http request to 3rd party server and get response with redirect 强化扫描第三方dll - Fortify to scan 3rd party dll's 使用MVC 4中的POST参数重定向以进行支付网关集成 - Redirect with POST parameters in MVC 4 for Payment Gateway Integration Nopcommerce - 自定义支付方式的 PostProcessPayment 不重定向到支付网关 URL - Nopcommerce - Custom Payment Method's PostProcessPayment not redirecting to Payment Gateway URL 如何通过我的asmx公开第三方的枚举? - How can I expose a 3rd party's enum through my asmx? 试图了解如何在IronPython中包含第三方模块 - Trying to understand how to include 3rd party modules in IronPython 通过Windows应用程序安装第三方应用程序 - Installing 3rd party applications through Windows Application 通过自己的图书馆公开第三方图书馆? - Exposing 3rd party library through own library? 记录由第三方NuGet软件包执行的HTTP请求和响应 - Log HTTP request and response executed by a 3rd party NuGet package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM