globalpayments / php-sdk

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

Unexpected Gateway Response: 502 - Mandatory Fields missing: [/request/card/expdate] #65

Closed jszoja closed 2 years ago

jszoja commented 3 years ago

In the \GlobalPayments\Api\Tests\Integration\Gateways\RealexConnector\Certifications\RealexSdkCertification::testCredit014d the test case the card expiry is set to null, which throws an expception.

I was able to fix it by setting proper expiry dates: $card->expMonth = '12'; $card->expYear = '99';

https://github.com/globalpayments/php-sdk/blob/5cf1b512408cf537a279c1d7ba943409e1a8584d/test/Integration/Gateways/RealexConnector/Certifications/SdkTest.php#L10956

jszoja commented 3 years ago

Could be that the intention here was testing against empty expiry, therefore it should use exception assertions?

jszoja commented 3 years ago

I'm pretty sure there is missing phpdoc comment for the function testCredit014d: /* @expectedException GlobalPayments\Api\Entities\Exceptions\GatewayException /