第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

Braintree 中的托管字段給出錯誤“無法確定付款方式”PHP Laravel

Braintree 中的托管字段給出錯誤“無法確定付款方式”PHP Laravel

PHP
嚕嚕噠 2022-10-28 09:43:46
誰能解釋我如何在 Laravel 中使用托管字段進(jìn)行有效的 Braintree 付款。我試圖自己查看文檔,但無法使其正常工作。我在控制器中創(chuàng)建了要發(fā)送到視圖的令牌,例如:$gateway = new \Braintree\Gateway([            'environment' => config('services.braintree.environment'),            'merchantId' => config('services.braintree.merchantId'),            'publicKey' => config('services.braintree.publicKey'),            'privateKey' => config('services.braintree.privateKey')        ]);$paypalToken = $gateway->ClientToken()->generate();return view('checkout')->with(['paypalToken' => $paypalToken]);這是我處理付款的方法:        $gateway = new \Braintree\Gateway([            'environment' => config('services.braintree.environment'),            'merchantId' => config('services.braintree.merchantId'),            'publicKey' => config('services.braintree.publicKey'),            'privateKey' => config('services.braintree.privateKey')        ]);        $nonce = $request->payment_method_nonce;        $result = $gateway->transaction()->sale([            'amount' => round(getNumbers()->get('newTotal') / 100, 2),            'paymentMethodNonce' => $nonce,            'options' => [              'submitForSettlement' => True            ]          ]);        if ($result->success) {            $transaction = $result->transaction;            $order = $this->addToOrdersTablesPaypal(                $email,                $firstName.' '.$lastName,                null            );            return redirect()->route('confirmation.index')->with('success_message', 'Thank you! Your payment has been successfully accepted!');        } else {            $order = $this->addToOrdersTablesPaypal(                $email,                $firstName.' '.$firstName,                $result->message            );            return back()->withErrors('An error occurred with the message: '.$result->message);        }誰能幫助我,了解缺少什么?
查看完整描述

1 回答

?
牧羊人nacy

TA貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超7個贊

我解決了它,我實(shí)際上找到了一種解決方法,我必須為托管字段創(chuàng)建一個控制器,并且它有效。



查看完整回答
反對 回復(fù) 2022-10-28
  • 1 回答
  • 0 關(guān)注
  • 109 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號