Closed linups closed 5 months ago
This is the code I use which functions, the data is just the same from the Paypal order create API
$provider = new PayPal(); $provider->setApiCredentials(config('paypal')); $provider->getAccessToken();
$response = $provider->createOrder([
"intent" => "CAPTURE",
"application_context" => [
"return_url" => route('checkout.success', ['order' => $order->id, 'token' => $token, 'type' => 'paypal']),
"cancel_url" => route('checkout.cancel', ['order' => $order->id, 'token' => $token]),
],
"purchase_units" => [
0 => [
'reference_id' => 'web-' . $order->id,
"amount" => [
"currency_code" => "GBP",
"value" => $total
]
]
]
]);
Hello,
Sorry, this is not exact issue, but i'm not able to find, where to post question.
I see in documentation a lot of examples with subscription. But i cannot find any example with regular charge (when is needed simple charge for one or multiple items) Did i missed something?
Thank you.