<small id='bI8gF'></small><noframes id='bI8gF'>

    • <bdo id='bI8gF'></bdo><ul id='bI8gF'></ul>

    <tfoot id='bI8gF'></tfoot>

    1. <i id='bI8gF'><tr id='bI8gF'><dt id='bI8gF'><q id='bI8gF'><span id='bI8gF'><b id='bI8gF'><form id='bI8gF'><ins id='bI8gF'></ins><ul id='bI8gF'></ul><sub id='bI8gF'></sub></form><legend id='bI8gF'></legend><bdo id='bI8gF'><pre id='bI8gF'><center id='bI8gF'></center></pre></bdo></b><th id='bI8gF'></th></span></q></dt></tr></i><div id='bI8gF'><tfoot id='bI8gF'></tfoot><dl id='bI8gF'><fieldset id='bI8gF'></fieldset></dl></div>
      <legend id='bI8gF'><style id='bI8gF'><dir id='bI8gF'><q id='bI8gF'></q></dir></style></legend>

      Paypal Checkout - 付款始终处于待处理状态

      时间:2023-06-24
    2. <small id='nCvf1'></small><noframes id='nCvf1'>

      <i id='nCvf1'><tr id='nCvf1'><dt id='nCvf1'><q id='nCvf1'><span id='nCvf1'><b id='nCvf1'><form id='nCvf1'><ins id='nCvf1'></ins><ul id='nCvf1'></ul><sub id='nCvf1'></sub></form><legend id='nCvf1'></legend><bdo id='nCvf1'><pre id='nCvf1'><center id='nCvf1'></center></pre></bdo></b><th id='nCvf1'></th></span></q></dt></tr></i><div id='nCvf1'><tfoot id='nCvf1'></tfoot><dl id='nCvf1'><fieldset id='nCvf1'></fieldset></dl></div>

              <tbody id='nCvf1'></tbody>

            <legend id='nCvf1'><style id='nCvf1'><dir id='nCvf1'><q id='nCvf1'></q></dir></style></legend>
            • <bdo id='nCvf1'></bdo><ul id='nCvf1'></ul>

              1. <tfoot id='nCvf1'></tfoot>
              2. 本文介绍了Paypal Checkout - 付款始终处于待处理状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                自从三天以来,我一直试图让 Paypal Checkout 工作,但我总是遇到订单已创建且资金从购买帐户中转入但未到达收款人帐户的问题.所以这是我的设置:

                Since three days i am trying to get the Paypal Checkout to work but i always have the problem that the order is created and the money in gone from the buying account but not reaching the payee account. So here is my setup:

                JavaScript 中的智能按钮整数化:

                paypal.Buttons({
                  
                  env: enviroment,
                  
                  // Set up the transaction
                  createOrder: function() {
                
                    let formData = new FormData();
                    formData.append('bookingId', bookingId);
                
                    return fetch (url_createOrder, {
                      method: 'POST',
                      body: formData
                    }).then(response => {
                      console.log(response);
                      return response.json()
                    })
                    .then(function(res) {
                      console.log(res);
                      return res.result.id;
                    });
                  },
                
                  // Finalize the transaction
                  onApprove: function(data, actions) {
                    console.log(data);
                    
                    // This function captures the funds from the transaction.
                    return actions.order.capture().then(function(details) {
                      console.log(details);
                      // This function shows a transaction success message to your buyer
                      // window.location.href = 'danke.php';
                    });
                  }
                
                }).render('#paypal-button-container');
                

                如您所见,createOrder 开始对此脚本的 AJAX 调用:

                [...]
                $client = new PayPalHttpClient($environment);
                
                $request = new OrdersCreateRequest();
                $request->prefer('return=representation');
                $request->body = self::buildRequestBody($price);
                // 3. Call PayPal to set up a transaction
                $response = $client->execute($request);
                echo json_encode($response, JSON_PRETTY_PRINT);
                
                // 4. Return a successful response to the client.
                return $response;
                }
                
                private static function buildRequestBody($price) {
                 return array(
                   'intent' => 'CAPTURE',
                   'application_context' => array(
                      'brand_name' => 'Example',
                        'cancel_url' => 'http://localhost/example/abbruch.php',
                        'return_url' => 'http://localhost/example/danke.php'
                      ),
                      'purchase_units' => array(
                        0 => array(
                          'reference_id' => 'example_addr',
                          'description' => 'example Address',
                          'amount' => array(
                            'currency_code' => 'EUR',
                            'value' => $price
                          )
                        )
                      )
                    );
                [...]
                

                到目前为止一切正常.我得到一个 OrderId,我返回到 AJAX 调用,然后我可以插入凭据并支付给定的价格.

                Everything works so far to this point. I get a OrderId back which i return to the AJAX call and then i am am able to insert credentials and pay the given price.

                当我完成支付时,JS 文件中智能按钮的 onApprove 被回调,我也得到了正确的 actions.order.capture() 响应:

                When i finish the payment the onApprove of the smart buttons in the JS file get called back and i also get the correct response of that actions.order.capture():

                {create_time: "2020-08-14T19:37:59Z", update_time: "2020-08-14T19:38:20Z", id: "6FP46164U47878440", intent: "CAPTURE", status: "COMPLETED", …}
                create_time: "2020-08-14T19:37:59Z"
                id: "6FP46164U47878440"
                intent: "CAPTURE"
                links: [{…}]
                payer:
                address:
                country_code: "DE"
                __proto__: Object
                email_address: "sb-ughwh2901918@personal.example.com"
                name: {given_name: "John", surname: "Doe"}
                payer_id: "8Z5RM2ERW6VTL"
                __proto__: Object
                purchase_units: [{…}]
                status: "COMPLETED"
                update_time: "2020-08-14T19:38:20Z"
                __proto__: Object
                

                之后钱从买家账户中消失了,但上面写着待处理",这是一个截图(但用德语)payment_is_pending.png

                Afterwards the money is gone from the buyer account but it says "pending", here a screenshot (but in german) payment_is_pending.png

                在卖家帐户中,我无法选择批准"之类的选项.我找到了一个paypal checkout api的例子,它的工作原理类似,并试图将它复制到我的代码中,但是是的……同样的故事.然后我想问题可能出在卖家沙箱帐户上,但如果我尝试一下,哪个由贝宝教程创建和提供的沙箱帐户也说待处理.

                On the seller account i cant select anything like "approve". I found an example of the paypal checkout api which works similar and tried to copy it into my code but yeah... same story. Then i thought maybe the problem is the seller sandbox account, but if i try it which an sandbox account created and given by a paypal tutorial is says pending as well.

                请帮忙!

                推荐答案

                付款正在等待中,因为没有电子邮件 sb-2xact2876961@business.example.com confirmed 的沙箱帐户,因此付款处于无人认领状态.如果无人认领,待处理的无人认领款项将在 30 天后自动退还.

                The payments are pending because there is no sandbox account with the email sb-2xact2876961@business.example.com confirmed, so the payments are in an unclaimed state. Pending unclaimed payments will be automatically returned after 30 days if left unclaimed.

                要领取付款,必须通过 https://www.sandbox.paypal.com/businessprofile/settings/email 和 https://developer.paypal.com/developer/notifications/

                To claim the payments, the email sb-2xact2876961@business.example.com must be confirmed on a sandbox account, via https://www.sandbox.paypal.com/businessprofile/settings/email and https://developer.paypal.com/developer/notifications/

                这篇关于Paypal Checkout - 付款始终处于待处理状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:告诉 PayPal 自动处理每月付款 下一篇:Paypal Sandbox API 内部错误

                相关文章

                <small id='fuar7'></small><noframes id='fuar7'>

                  <legend id='fuar7'><style id='fuar7'><dir id='fuar7'><q id='fuar7'></q></dir></style></legend>

                  <i id='fuar7'><tr id='fuar7'><dt id='fuar7'><q id='fuar7'><span id='fuar7'><b id='fuar7'><form id='fuar7'><ins id='fuar7'></ins><ul id='fuar7'></ul><sub id='fuar7'></sub></form><legend id='fuar7'></legend><bdo id='fuar7'><pre id='fuar7'><center id='fuar7'></center></pre></bdo></b><th id='fuar7'></th></span></q></dt></tr></i><div id='fuar7'><tfoot id='fuar7'></tfoot><dl id='fuar7'><fieldset id='fuar7'></fieldset></dl></div>
                1. <tfoot id='fuar7'></tfoot>

                    <bdo id='fuar7'></bdo><ul id='fuar7'></ul>