NikolaGavric94 / laravel-square

Square integration with Laravel/Lumen >=5.5
MIT License
31 stars 23 forks source link

Production api is calling instead of Sandbox #36

Closed anish-techpro closed 4 years ago

anish-techpro commented 4 years ago

my config file is such:

<?php

return [

    'default' => 'square',
    'connections' => [
        'square' => [
            'namespace'      => 'Nikolag\Square\SquareService',
            'application_id' => env('SQUARE_SANDBOX_ID'),
            'access_token'   => env('SQUARE_SANDBOX_ACCESS_TOKEN'),
            'sandbox' => true,

            'user' => [
                'namespace'  => env('SQUARE_USER_NAMESPACE', '\App\User'),
                'identifier' => env('SQUARE_USER_IDENTIFIER', 'id'),
            ],

            'order' => [
                'namespace'          => env('SQUARE_ORDER_NAMESPACE', '\App\Order'),
                'identifier'         => env('SQUARE_ORDER_IDENTIFIER', 'id'),
                'service_identifier' => env('SQUARE_PAYMENT_IDENTIFIER', 'payment_service_id'),
            ],
        ],
    ],
];

though "sandbox" is true still the api that is calling is using "https://connect.squareup.com" as baseUrl.

NikolaGavric94 commented 4 years ago

Thanks for trying out the package, I will take a look at this later today in approx. 5-6h from now and will try to diagnose as soon as possible and keep u updated.

Sorry for the inconvenience

anish-techpro commented 4 years ago

I mean it should call the sandbox api when "sanbox" is true in config, right?

NikolaGavric94 commented 4 years ago

Yes, I see now that we have a missing test case for when sandbox is on or off, so I will definitely start from there, but yes, the sandbox is covered in SquareConfig.php

anish-techpro commented 4 years ago

I think the issue was because I was using a lower version. I updated the package to the latest version and now the is issue is fixed I think.

NikolaGavric94 commented 4 years ago

Glad to hear that! When you are sure it is fixed, just close this issue, if you dont close it in the next 5-6h i will consider u still have it and start investigating @anish-techpro