hps / heartland-php

Heartland Payment Systems Payment Gateway PHP SDK
https://developer.heartlandpaymentsystems.com/SecureSubmit/
GNU General Public License v2.0
25 stars 23 forks source link

Details passed in as the 5th param of a charge call aren't returned in the HpsAuthorisation #22

Closed andyrooster closed 8 years ago

andyrooster commented 8 years ago

If a details object is passed into the charge call I would expect those details to be returned in the HpsAuthorization however the HpsAuthorization returned from the certification gateway always contains NULL for the three values.

Example charge call: $details = (object) array('memo' => 'My description', 'invoiceNumber' => 'IN_1234', 'customerId' => '9090'); $auth = $chargeService->charge(50, 'usd', $token], null, false, $details);

Returned auth object: object(HpsAuthorization)#99 (19) { ["avsResultCode"]=> string(1) "0" ["avsResultText"]=> string(18) "AVS Not Requested." ["cvvResultCode"]=> string(1) "M" ["cvvResultText"]=> string(6) "Match." ["cpcIndicator"]=> NULL ["authorizationCode"]=> string(6) "27445A" ["authorizedAmount"]=> NULL ["cardType"]=> string(4) "Visa" ["description"]=> NULL ["invoiceNumber"]=> NULL ["customerId"]=> NULL ["descriptor"]=> NULL ["tokenData"]=> NULL ["transactionId"]=> string(10) "1011918135" ["clientTransactionId"]=> NULL ["responseCode"]=> string(2) "00" ["responseText"]=> string(8) "APPROVAL" ["referenceNumber"]=> string(12) "618712011447" ["_header":protected]=> object(HpsTransactionHeader)#107 (4) { ["gatewayResponseCode"]=> string(1) "0" ["gatewayResponseMessage"]=> string(7) "Success" ["responseDt"]=> string(27) "2016-07-05T03:41:16.1065041" ["clientTxnId"]=> NULL } }

I believe the same goes for the 6th parameter $txnDescriptor also.

ttnnkkrr commented 8 years ago

Thanks Andy, I will look into this this morning

ttnnkkrr commented 8 years ago

These do not get returned by the gateway in that call. To get these you would need to issue a $chargeService->get($auth->transactionId);

andyrooster commented 8 years ago

Seems odd that it doesn't return these details, but fair enough.