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

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

未找到列:1054 Champ 'payment_gateway' inconnu dans

未找到列:1054 Champ 'payment_gateway' inconnu dans

PHP
慕姐8265434 2023-04-21 13:12:14
我參加了使用 laravel 的電子商務培訓,我想通過 paypal 購物車進行在線支付,但它在payment_gateway表格訂單領域給我錯誤,Column not found: 1054 Field 'payment_gateway' unknown in field list。你好,我參加了一個使用 laravel 的電子商務培訓,我想通過 paypal 購物車進行在線支付,但它在payment_gateway表格訂單領域給我錯誤,Column not found: 1054 Field 'payment_gateway' unknown in field list。checkoutController.php/**     * Store a newly created resource in storage.     *     * @param  \Illuminate\Http\Request  $request     * @return \Illuminate\Http\Response     */    public function paypalCheckout(Request $request)    {        // Check race condition when there are less items available to purchase        if ($this->productsAreNoLongerAvailable()) {            return back()->withErrors('Sorry! One of the items in your cart is no longer avialble.');        }        $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            ]        ]);        $transaction = $result->transaction;        if ($result->success) {            $order = $this->addToOrdersTablesPaypal(                $transaction->paypal['payerEmail'],                $transaction->paypal['payerFirstName'].' '.$transaction->paypal['payerLastName'],                null            );
查看完整描述

2 回答

?
九州編程

TA貢獻1785條經驗 獲得超4個贊

打字的時候好像打錯了payement_gateway => payment_gateway



查看完整回答
反對 回復 2023-04-21
?
慕俠2389804

TA貢獻1719條經驗 獲得超6個贊

確保了:

1- 將 payment_gateway 添加到 Order 模型的可填充數組

2-payment_gateway 列在表“訂單”列中...


查看完整回答
反對 回復 2023-04-21
  • 2 回答
  • 0 關注
  • 258 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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