Git Product home page Git Product logo

st-george-ipg's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

hayden-t robryanx

st-george-ipg's Issues

About the 2017 problem again

shouldnt it just be a matter of using a old enough os for your docker/ecs for it to work ? have you tried to see at what version it stops working ?

general warning about ambiguous error message "CUST CONTACT THEIR BANK"

This is something that has been a big but deceptively simple problem for our project. We would get these "CUST CONTACT THEIR BANK" errors reported by customers at times and couldn't work out what it means, and all st george could tell us was that it was a problem at the customers bank and not their problem....

Well it turns out they just reused that error message and it actually gives little guide as to that it, in this case was just incorrect CVV security code errors !!! as you will get the same text message for code 1, 2 and 5. yet 5 really should have its own message....
api docs:
05
CUST CONTACT
THEIR BANK
Failed security check, eg. CVN (Card Verification Number) on
back of card was entered incorrectly. Refer the customer to
their bank.

so if you want to get out the error code number from this library, use:
$ex->getResponseCode()

Unexpected success on incorrect CVC

So if i put in empty cvc '' or 1 or 0 or anything less than 100 or even a string, it still completes transaction, not sure if this is problem with webservice or this library but just wanted to bring it up.
To get around this just did test,
$cvc = (intval($cvc) > 99 ? intval($cvc) : 9999);//generate failure if invalid input

Getting regular errors from stgeorge

Not sure what is causing this but every few days we get customers that their card fails, and the error from bank is 'check number' they try several times with no luck, they ring us up and we can pt it through our desk moto no problems, also we've had error 'under minimum transaction limit' on an order over $200.... have you heard of st george payway ? we wonder if this is meant to be the successor to webpay ??

Notes on getting to work with PHP 7 / 8

So some of the lib versions required by this package is not compatible with php 7 or 8

the current requirements are

    "inacho/php-credit-card-validator": "^1.0",
    "sabre/xml": "^1.5",
    "guzzlehttp/guzzle": "^6.3"

sabre needs 3.0
guzzle im not sure, but my cms already had 7.4.5
inacho has not been updated so you have to manually edit the files, or try a fork

so:
composer require "guzzlehttp/guzzle:7.4.5 as 6.3"
composer require "sabre/xml:3.0 as 1.5"
composer require "mitchdav/st-george-ipg"

then i manually update inacho lib like so:
https://github.com/inacho/php-credit-card-validator/pull/28/files

cant access error code from exception

Hi, I cant work out how or if there is a way to access the error code returned from stg via the exception,
eg, we de this to get the message: $error = $ex->getMessage();
but there appears no way to get the error code number, which is in some cases, more important.

Fatal error: Uncaught exception 'StGeorgeIPG\Exceptions\TransactionFailedException' with message 'Transaction failed after 0 tries.'

Hi again, i just installed this and tried running with a test transaction but the error is not very clear what is going wrong:

Fatal error: Uncaught exception 'StGeorgeIPG\Exceptions\TransactionFailedException' with message 'Transaction failed after 0 tries.' in /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php:314 Stack trace: #0 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php(312): StGeorgeIPG\Client->getResponse(Object(StGeorgeIPG\Request), 0) #1 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php(312): StGeorgeIPG\Client->getResponse(Object(StGeorgeIPG\Request), 1) #2 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php(312): StGeorgeIPG\Client->getResponse(Object(StGeorgeIPG\Request), 2) #3 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php(347): StGeorgeIPG\Client->getResponse(Object(StGeorgeIPG\Request), 3) #4 /home/user/public_html/_webpay/_new/test.php(32): StGeorgeIPG\Client->execute(Object(StGeorgeIPG\Request)) #5 {main} thrown in /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php on line 314

this is my code:

<?php


require __DIR__ . '/../../_composer_libs/vendor/autoload.php';

use StGeorgeIPG\Client;
use StGeorgeIPG\Providers\WebService;

$clientId            = getenv('ourclientnumber');
$authenticationToken = getenv('ourauthtoken');

$webService = new WebService();

$webService->setClientId($clientId)
           ->setAuthenticationToken($authenticationToken);

$client = new Client($webService);

use StGeorgeIPG\Exceptions\ResponseCodes\Exception;


$amount     = 1.00; // In dollars
$cardNumber = 'myrealccnumber';
$month      = 1;
$year       = 2021;

$purchaseRequest = $client->purchase($amount, $cardNumber, $month, $year);

try {
    $purchaseResponse = $client->execute($purchaseRequest);

    echo 'The charge was successful.' . "\n";
} catch (Exception $ex) {
    echo 'The charge was unsuccessful.' . "\n";
    echo $ex->getMessage() . "\n";

    var_dump($purchaseRequest);
    var_dump($ex->getResponse());
}


?>

your example or code creating uncaught exceptions

So following your example with code here #3 its never getting to the "} catch (Exception $ex) {" bit and reporting details on the transaction and error, im just getting a fatal exception in php eg,

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The card expiry date is invalid.' in /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Request.php:289 Stack trace: #0 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Request.php(740): StGeorgeIPG\Request::validateInputIsCardExpiryDate(1, 2000) #1 /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Client.php(164): StGeorgeIPG\Request->setCardExpiryDate(1, 2000) #2 /home/user/public_html/_webpay/_new/test.php(26): StGeorgeIPG\Client->purchase(1, 'ccnumber...', 1, 2000) #3 {main} thrown in /home/user/public_html/_composer_libs/vendor/mitchdav/st-george-ipg/src/Request.php on line 289

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.