ignited / laravel-omnipay

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

Null return value of $response->getMessage() #32

Closed vintots closed 7 years ago

vintots commented 8 years ago

here is my paypal setup in the laravel-omnipay.php

//start 'default' => 'paypal',

'gateways' => [
    'paypal' => [
        'driver'  => 'PayPal_Express',
        'options' => [
            'username'  => env( 'OMNIPAY_PAYPAL_EXPRESS_USERNAME', '' ),
                            'password'  => env( 'OMNIPAY_PAYPAL_EXPRESS_PASSWORD', '' ),
                           'signature' => env( 'OMNIPAY_PAYPAL_EXPRESS_SIGNATURE', '' ),
                           'testMode' => true,
            'solutionType'   => '',
            'landingPage'    => '',
            'headerImageUrl' => ''
        ]
    ]
]

///end $cardInput = [ 'number' => '4444333322221111', 'firstName' => 'MR. WALTER WHITE', 'expiryMonth' => '03', 'expiryYear' => '16', 'cvv' => '333', ];

$card = \Omnipay::creditCard($cardInput);
$response = \Omnipay::purchase([
    'amount'    => '100.00',
    'returnUrl' => 'http://bobjones.com/payment/return',
    'cancelUrl' => 'http://bobjones.com/payment/cancel',
    'card'      => $cardInput
])->send();

dd($response->getMessage());

Is there any configuration for this code to work ? thank you

alexw23 commented 7 years ago

There's a paypal express example here:

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

Otherwise your issue should be reposted in https://github.com/thephpleague/omnipay-paypal as it's unrelated to laravel-omnipay.