【问题标题】:The requested action could not be performed, semantically incorrect, or failed business validation请求的操作无法执行、语义不正确或业务验证失败
【发布时间】:2021-04-14 00:01:22
【问题描述】:

我正在尝试此代码,但它返回了此错误。我认为 clientID 的问题我用其他帐户更改了 clientID 然后它工作正常但是当我尝试实现代码中的这个 clientID 时,它显示错误. 任何可以在这方面帮助我的人。我将非常感谢你。

<head>
  <title>Paypal Checkout</title>
  <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Ensures optimal rendering on mobile devices. -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Optimal Internet Explorer compatibility -->
</head>

<body>
  <script
    src="https://www.paypal.com/sdk/js?client-id=Ae5Nri4XLfck8VR95yNNjYo8UymUe4n7Uk3DBID2UlkpemxB125veepMUkM5DxEiglownCaxa3jb1KR5">
  </script>

    enter code here

  <div id="paypal-button-container"></div>

  <script>
    paypal.Buttons({
        createOrder: function(data, actions) {
      // This function sets up the details of the transaction, including the amount and line item details.
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: '10'
          }
        }]
      });
    },
    onApprove: function(data, actions) {
      // This function captures the funds from the transaction.
      return actions.order.capture().then(function(details) {
        // This function shows a transaction success message to your buyer.
        alert('Transaction completed by ' + details.payer.name.given_name);
        console.log(details);
      });
    }
    }).render('#paypal-button-container');
    // This function displays Smart Payment Buttons on your web page.
  </script>
</body>

【问题讨论】:

  • 因为这更多是一个业务问题(特定帐户是问题而不是代码),所以我投票决定关闭,因为不可重现。

标签: javascript php paypal checkout


【解决方案1】:

我认为我使用此帐户的 clientID 受到限制。当我打开检查代码时,我收到了此消息 click here

【讨论】:

    猜你喜欢
    • 2019-09-11
    • 2016-01-28
    • 2018-07-15
    • 2020-12-02
    • 1970-01-01
    • 2021-01-28
    • 1970-01-01
    • 2018-04-12
    • 1970-01-01
    相关资源
    最近更新 更多