globalpayments / php-sdk

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

request for new fields non existent on old (not psd2) sdk #63

Closed cifsl closed 2 years ago

cifsl commented 3 years ago

Hi,

We are migrating our plataforms to use the new sdk for psd2 and we are experiencing some problems. We have contacted the migration support company and they have referred us to this repository.

Once installed, testing the simple example described in:

https://github.com/globalpayments/php-sdk/blob/master/examples/pay-invoice/charge.php

ServicesConfig object requires the fields secretApiKey and serviceUrl

$config = new ServicesConfig(); $config->secretApiKey = 'skapi_cert_MYl2AQAowiQAbLp5JesGKh7QFkcizOP2jcX9BrEMqQ'; $config->serviceUrl = 'https://cert.api2.heartlandportico.com';

On our platforms (before this change) we used the realexpayments api and the required fields were merchantId, a secret and a HPP url (one for sandbox and another for production environments)

How do we get an api key for our company ?

What are the new service urls for hpp / api requests (sandbox & production environments)

MSmedal commented 3 years ago

Hello!

This SDK wraps and connects to a handful of gateways that are under the Global Payments umbrella. The example you linked to is one that uses the Portico Gateway, but it sounds like you need to connect to the GlobalPayments Ecomm (aka RealEx) gateway. If you're using the latest version of our SDK (2.2.1) then your configuration should look something like:

$config = new GpEcomConfig(); $config->merchantId = ''; $config->accountId = ''; $config->sharedSecret = ''; $config->rebatePassword = ''; $config->refundPassword = ''; $config->serviceUrl = 'https://api.sandbox.realexpayments.com/epage-remote.cgi'; ServicesContainer::configureService($config);

Let me know if this help!

cifsl commented 3 years ago

Yeah, we resolved & send a patch / pull request yesterday, thanks

Also, can anyone update last composer package to include this patch

cifsl commented 3 years ago

Sorry to repeat myself, but please, can one of the project administrators accept the patches / pull requests and include them in the dependencies of the package that is installed via composer ?

I don't want to patch my local files as in the future the composer will overwrite them when they update with a new version