显示paypal错误
This commit is contained in:
parent
eb16ddf105
commit
940b82cdeb
|
|
@ -69,6 +69,7 @@ class PaypalController
|
|||
$orderNumber = $data['orderNumber'];
|
||||
$customer = current_customer();
|
||||
$order = OrderRepo::getOrderByNumber($orderNumber, $customer);
|
||||
$total = round($order->total, 2);
|
||||
|
||||
$paypalOrder = $this->paypalClient->createOrder([
|
||||
"intent" => "CAPTURE",
|
||||
|
|
@ -76,7 +77,7 @@ class PaypalController
|
|||
[
|
||||
"amount" => [
|
||||
"currency_code" => $order->currency_code,
|
||||
"value" => $order->total,
|
||||
"value" => $total,
|
||||
],
|
||||
'description' => 'test'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -23,10 +23,13 @@
|
|||
orderNumber: "{{$order->number}}",
|
||||
})
|
||||
}).then(function (res) {
|
||||
//res.json();
|
||||
return res.json();
|
||||
}).then(function (orderData) {
|
||||
//console.log(orderData);
|
||||
if (orderData.error) {
|
||||
layer.alert(orderData.error.details[0].description, function(index){
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
return orderData.id;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue