/*
|--------------------------------------------------------------------------
| Redirect route after callback
|--------------------------------------------------------------------------
|
| Which route to call after the callback has been processed.
|
*/
'callback_redirect_route' => 'home',
// (1) - Set gateway
Shop::setGateway('paypalExpress');
// (2) - Call checkout / OPTIONAL
// You can call this to keep a standard flow
// Although this step for this gateway is not needed.
Shop::checkout();
// (3) - Create order
$order = Shop::placeOrder();
// (4) - Review order and redirect to payment
if ($order->isPending) {
// PayPal URL to redirect to proceed with payment
$approvalUrl = Shop::gateway()->getApprovalUrl();
// Redirect to url
return redirect($approvalUrl);
}
// (5) - Callback
// You don't have to do anything.
// Laravel Shop will handle the callback and redirect the customer to the configured route.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.