Closed karlimlengco closed 7 years ago
I would also like to know this. Where do we put the PayPal credentials?
As far as I see - there is no such place in the config
Overall, this package gives nearly no advantage or extra convenience when compared to the original Omnipay PHP package
It's just a static facade that makes things more confusing, not less :)
Somebody should write a better Laravel package!
just add them to the options array, or merge in another array when you create the message. You could even use the Laravel config options to store them.
$response = Omnipay::Authorize([put your username etc here with the options required for the request]);
I was killing myself for weeks for that
Indeed there is, after adding the Service Provider and the Facade, issue the command
$ php artisan vendor:publish
It will generate a config file in project/dir/config/laravel-omnipay.php
So here is an example of how to add password, username and, signature, it works for any gateway, the answer came late but I hope it helps others in the next ``<?php
return [
// The default gateway to use
'default' => 'paypal',
// Add in each gateway here
'gateways' => [
'paypal' => [
'driver' => 'PayPal_Express',
'options' => [
'username' => env( 'OMNIPAY_PAYPAL_EXPRESS_USERNAME', '' ),
'password' => env( 'OMNIPAY_PAYPAL_EXPRESS_PASSWORD', '' ),
'signature' => env( 'OMNIPAY_PAYPAL_EXPRESS_SIGNATURE', '' ),
'solutionType' => env( 'OMNIPAY_PAYPAL_EXPRESS_SOLUTION_TYPE', '' ),
'landingPage' => env( 'OMNIPAY_PAYPAL_EXPRESS_LANDING_PAGE', '' ),
'headerImageUrl' => env( 'OMNIPAY_PAYPAL_EXPRESS_HEADER_IMAGE_URL', '' ),
'brandName' => 'Mozambique Adviser',
'testMode' => env( 'OMNIPAY_PAYPAL_TEST_MODE', true )
]
],
]
];``
@isneezy Could you make a PR adding that info?
I've posted the paypal express example here thanks @isneezy
https://github.com/ignited/laravel-omnipay#paypal-express-example
Is there an autherize.net config example?
Is there a config for adding username, password and signature?