gopay-php-api
gopay-php-api copied to clipboard
Error after upgrading 1.7.0 to 1.7.3
Hi
I have this error after Error after upgrading 1.7.0 to 1.7.3:
[2023-12-24 13-21-44] PHP Warning: Undefined array key "gatewayUrl" in endor/gopay/payments-sdk-php/src/GoPay.php:42 @ /order/status?id=117885 [2023-12-24 13-21-44] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in endor/gopay/payments-sdk-php/src/GoPay.php:42 @ /order/status?id=117885 [2023-12-24 13-21-45] PHP Warning: Undefined array key "gatewayUrl" in endor/gopay/payments-sdk-php/src/GoPay.php:28 @ /order/status?id=117885 [2023-12-24 13-21-45] PHP Warning: Undefined array key "gatewayUrl" in endor/gopay/payments-sdk-php/src/GoPay.php:42 @ /order/status?id=117885 [2023-12-24 13-21-45] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in endor/gopay/payments-sdk-php/src/GoPay.php:42 @ /order/status?id=117885 [2023-12-24 13-21-45] GoPay Response: @ /order/status?id=117885 [2023-12-24 13-21-45] GoPay\Http\Response #230 rawBody: 'cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for /api/oauth2/token' statusCode: 500 json: array (0) @ /order/status?id=117885
How to fix it?
Some information on Slack from Rixafy
Api url payment gateway for production is https://gate.gopay.cz/api and for sandbox https://gw.sandbox.gopay.com/api
cc @MKI-Miro
I am sorry I dont understand. It works on 1.7.0 but not on 1.7.3 without any change in code. I am not changing urls
@MKI-Miro
//sandbox
$gopay = GoPay\Api::payments([
'goid' => 'my goid',
'clientId' => 'my id',
'clientSecret' => 'my secret',
'gatewayUrl' => 'https://gw.sandbox.gopay.com/api',
'scope' => GoPay\Definition\TokenScope::ALL,
'language' => GoPay\Definition\Language::CZECH,
'timeout' => 30
]);
//production
$gopay = GoPay\Api::payments([
'goid' => 'my goid',
'clientId' => 'my id',
'clientSecret' => 'my secret',
'gatewayUrl' => 'https://gate.gopay.cz/api',
'scope' => GoPay\Definition\TokenScope::ALL,
'language' => GoPay\Definition\Language::CZECH,
'timeout' => 30
]);
You must change input argument for GoPay\Api::payments
and specify gatewayUrl
@MKI-Miro Is everything clear? Can we close this?
@geeshta I think you can close this.
yes you can close