ignited / laravel-omnipay

Omnipay for Laravel & Lumen
MIT License
509 stars 100 forks source link

Config for paypal credentials #15

Closed karlimlengco closed 7 years ago

karlimlengco commented 9 years ago

Is there a config for adding username, password and signature?

ghost commented 8 years ago

I would also like to know this. Where do we put the PayPal credentials?

dusterio commented 8 years ago

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!

nicksnellockts commented 8 years ago

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]);

isneezy commented 8 years ago

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 )
        ]
    ],
]

];``

ebisbe commented 7 years ago

@isneezy Could you make a PR adding that info?

alexw23 commented 7 years ago

I've posted the paypal express example here thanks @isneezy

https://github.com/ignited/laravel-omnipay#paypal-express-example

chandlerwilcox88 commented 5 years ago

Is there an autherize.net config example?