laravel 5 - How to get paymentMethodNonce in Braintree API? -
i'm working in laravel 5.4 transactions successfull when try 'fake_nonce' type of string provided braintree docs. when tried paymentmethodnonce gives me error nonce not found. , http error!!! if try configure myself! take @ controller function below
public function addorder(request $request){ $customer = braintree_customer::create([ 'firstname' => $request->guest_name, 'email' => $request->guest_email, 'phone' => $request->guest_phone ]); $customer->success; $customer->customer->id; $find = braintree_customer::find($customer->customer->id); $noncefromtheclient = braintree_paymentmethodnonce::find($find); $result = braintree_transaction::sale([ 'amount' => $request->subtotal, 'paymentmethodnonce' => $noncefromtheclient, 'options' => [ 'submitforsettlement' => true ] ]); if ($result->success) { $settledtransaction = $result->transaction; } else { print_r($result->errors); } cart::destroy(); return view('guest/track', compact('result')); }
wiki
Comments
Post a Comment