Adyen加密信用卡数据[python][请求]

2024-09-29 19:27:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图了解如何在使用adyen checkout的demandware网站上自动化结账过程

payload_creditcard = {
...
"dwfrm_billing_paymentMethod": "CREDIT_CARD",
"dwfrm_billing_creditCardFields_cardType": "Master+card",
"dwfrm_billing_creditCardFields_adyenEncryptedData":"adyenjs_0_1_18$ibddsadc65...", 
"dwfrm_billing_creditCardFields_cardNumber":"************3345"
"dwfrm_billing_creditCardFields_expirationMonth": "20",
"dwfrm_billing_creditCardFields_expirationYear": "2030"
}

这是付款的脚本:

checkout_page = s.get("https://www.slamjam.com/en_IT/checkout-begin?stage=payment#payment",headers=headers)

checkout_card = s.post("https://www.slamjam.com/on/demandware.store/Sites-slamjam-Site/en_IT/CheckoutServices-SubmitPayment",headers=headers, data=payload_creditcard)

place_order = s.get("https://www.slamjam.com/en_IT/checkout-begin?stage=placeOrder#placeOrder",headers=headers)

问题是每次“dwfrm\u billing\u creditCardFields\u adyenEncryptedData”都会更改,我不知道如何生成它。 我在网站中找到了javascript函数,但要让它们工作,你需要一个带有卡片输入的表单的html,显然我不能每次在python代码中需要这个标记时都插入html,因为一切都是基于速度的。你有什么方法可以推荐我吗?或者如果有人以前做过的话


Tags: httpscom网站wwwitenheaderscreditcard
1条回答
网友
1楼 · 发布于 2024-09-29 19:27:14

adyen客户端js故意执行每次会话、客户端加密,以确保购物者卡信息的安全,并将公司服务器置于PCI范围之外

如果您真的需要对此进行测试,那么您将需要使用类似selenium webdriver for python的东西来实际加载页面并呈现js

相关问题 更多 >

    热门问题