3

我正在尝试从https://supremenewyork.com/checkout传递表单 (如果网页将您重定向到商店,请添加一些项目并重试)

它有 reCAPTCHA,所以我决定使用 anti-captcha.com 服务。我已经成功地找出了通过 sitekey 和网页链接(https://supremenewyork.com/checkout)获取验证码响应的请求,但是我如何在页面上使用它呢?

我试过这段代码:

$('script[src="https://www.gstatic.com/recaptcha/api2/v1520836262157/recaptcha__ru.js"]').remove()
$('script[src="https://www.google.com/recaptcha/api.js"]').remove()
$('.g-recaptcha').remove()

for (let i = 0; i < $('body > div').length; i++) {
  if ($('body > div').eq(i).find('iframe').length > 0) {
    if ($('body > div').eq(i).find('iframe').attr('src').indexOf('www.google.com/recaptcha') > -1) {
      $('body > div').eq(i).find('iframe').remove()
    }
  }
}

$('[name=\'commit\']')
  .before(`<textarea style="display:none;" name="g-recaptcha-response">"""${captcha_response}</textarea>`)

但它不起作用。当我按下“处理付款”按钮时,它会将我重定向到“您的卡已被拒绝”之类的页面,但是如果您通过浏览器中的网络选项卡检查传出请求,您会看到在 checkout.json 的响应中会有'失败原因:null' - 表示请求不正确。对于正确的请求,网络选项卡显示 status.json,其中“失败原因”可能是“信用卡”或类似的东西。

提前感谢您的回答!

4

0 回答 0