globalpayments / php-sdk

GNU General Public License v2.0
49 stars 66 forks source link

The specified configuration has not been configured for gateway processing. #79

Closed legitalk closed 3 years ago

legitalk commented 3 years ago

After updating to v 2.2 (from version 2.0) we are receiving this API response from ServicesContainer - getClient method, when client is trying to submit transaction:

The specified configuration has not been configured for gateway processing.

Has been something changed, which is causing this issue, as it was working fine on previous version?

UPDATE:

I can see, since version 2.1, ServiceConfig has been changed. This is how we used in 2.0:

$config = new ServicesConfig();

$config->merchantId   = $this->merchant_id;
$config->accountId    = $this->account_id;
$config->sharedSecret = $this->shared_secret;
$config->serviceUrl   = $this->service_url;

ServicesContainer::configure($config);

So how could this be changed to used proper ServicesConfig, please?

Thank you.

legitalk commented 3 years ago

Code updated based on the new docs:

https://developer.globalpay.com/api/card-payments#api-authorization

` $config = new GpEcomConfig();

$config->merchantId = $this->merchant_id; $config->accountId = $this->account_id; $config->sharedSecret = $this->shared_secret; $config->serviceUrl = $this->service_url;

ServicesContainer::configureService($config); `