亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Paypal Checkout - 付款始終處于待處理狀態

Paypal Checkout - 付款始終處于待處理狀態

慕蓋茨4494581 2023-01-06 16:03:43
三天以來,我一直在努力讓 Paypal Checkout 正常工作,但我總是遇到這樣的問題:訂單已創建,購買賬戶中的錢沒有到達收款人賬戶。所以這是我的設置: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'      )到目前為止一切正常。我得到一個 OrderId,我返回到 AJAX 調用,然后我能夠插入憑據并支付給定的價格。之后錢從買家賬戶中消失,但顯示“待定”,這里是截圖(但是德語) payment_is_pending.png在賣家帳戶上,我無法選擇“批準”之類的任何內容。我找到了一個類似 paypal checkout api 的例子,并試圖將它復制到我的代碼中,但是是的......同樣的故事。然后我想問題可能出在賣家沙盒帳戶上,但如果我嘗試它,那么由 paypal 教程創建和提供的沙盒帳戶也會顯示待處理。請幫忙!
查看完整描述

1 回答

?
素胚勾勒不出你

TA貢獻1827條經驗 獲得超9個贊

付款處于待處理狀態,因為沒有電子郵件為 [email protected] confirmed的沙盒帳戶,因此付款處于無人認領狀態。如果無人認領,待處理的無人認領付款將在 30 天后自動退還。

要領取付款,必須通過https://www.sandbox.paypal.com/businessprofile/settings/emailhttps://developer.paypal在沙盒帳戶上確認電子郵件 [email protected] .com/developer/notifications/


查看完整回答
反對 回復 2023-01-06
  • 1 回答
  • 0 關注
  • 427 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號