I'm using the srmklive/laravel-paypal v.3 package ( https://github.com/srmklive/laravel-paypal that does not have documentation) in a laravel project. when i press a button the controller process this code:
public function payment()
{
$provider = new PayPalClient;
// Through facade. No need to import namespaces
$provider = PayPal::setProvider();
$provider->setCurrency('EUR');
$provider->createOrder([
"intent"=> "CAPTURE",
"purchase_units"=> [
"amount"=> [
"currency_code"=> "EUR",
"value"=> "100.00"
]
]
]);
}
But i have this error: Trying to access array offset on value of type null
Relative to this portion of code
$this->apiUrl = collect([$this->config['api_url'], $this->apiEndPoint])->implode('/');
of class srmklive\paypal\src\Traits\PayPalAPI\Orders.php:21
Someone can help me and show how to use this package?