Reputation: 1068
I followed thistutorial. I tried to integrate the paypal into my website. My purpose is to allow to user to send money to another user via a donation button using paypal. my configuration :
return array(
// The default gateway to use
'default' => 'paypal',
// Add in each gateway here
'gateways' => array(
'paypal' => array(
'driver' => 'PayPal_Express',
'options' => array(
'solutionType' => '',
'landingPage' => '',
'headerImageUrl' => ''
)
)
)
);
But when I call $gateway = Omnipay::create('PayPal_Express');
I get this error:
BadMethodCallException
Method [create] is not supported by the gateway [paypal].
How can I correct the problem here,is there any configuration I have to make before calling the create function? Is there any way to integrate paypal payment in Laravel into my website?
Upvotes: 2
Views: 464
Reputation: 1068
Actually I forget to call : use Omnipay\Omnipay;
before getting into my controller class. Now it works.
Upvotes: 2
Reputation: 9357
I believe it should be $gateway = GatewayFactory::create('PayPal_Express');
Upvotes: 0