Skip to content

i am getting this error while trying to use paystack to make payment in laravel #198

@salimzy

Description

@salimzy

i am get getting this error and Call to undefined method Unicodeveloper\Paystack\Facades\Paystack::getAuthorizationUrl()

and this is my code

$data = array( "amount" => $this->total * 100, "reference" => 'ref-'.paystack()->genTranxRef(), "email" => $this->user->email, "currency" => "NGN", "orderID" => rand(999999999,10000000000000), "callback_url"=> route('payment.callback'), ); try{ $paystack = new Paystack(); $paymentDetails = $paystack->getAuthorizationUrl($data)->redirectNow(); dd($authorizationUrl = $paymentDetails->url()); // return $this->paystack->getAuthorizationUrl()->redirectNow(); // dd(Paystack()->getAuthorizationUrl($data)); }catch(Exception $e) { return Redirect::back()->withMessage(['message'=>'The paystack token has expired. Please refresh the page and try again.', 'type'=>'error']); }

i dont know if anyone can help me fix this bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions