Giter Club home page Giter Club logo

Comments (4)

ttnnkkrr avatar ttnnkkrr commented on August 27, 2024 1

@bony-corcrm Thank you for reporting this. \HpsCreditService::capture returns \HpsReportTransactionDetails and upon review the Gratuity amount is indeed returned from our gateway but not captured in the object. We will merge this in a future release. To address this problem, I have added a branch to address this missing field. You may pick it up from the branch https://github.com/hps/heartland-php/blob/gratuity-information/src/Entities/Credit/HpsReportTransactionDetails.php#L17

I recommend grabbing the entire file;

from heartland-php.

ttnnkkrr avatar ttnnkkrr commented on August 27, 2024

In a typical situation for tips 2 transactions are performed
\HpsCreditService::authorize
and when the sale is complete
\HpsCreditService::capture
the third param of \HpsCreditService::capture is for gratuity and would need to be an unsigned float with up to 2 digits to precision.

$creditService->authorize(9.00, 'usd',$token,$cardHolder);
$creditService->capture($transactionId, 11.00, 2.00);

Does this help? @bony-corcrm

from heartland-php.

bony-corcrm avatar bony-corcrm commented on August 27, 2024

Thanks for reply,

Instead of token I am using HpsCreditCard

$CreditService->authorize('50.00', 'usd',$creditCard);
Then I got the

HpsAuthorization Object ( [avsResultCode] => 0 [avsResultText] => AVS Not Requested. [cvvResultCode] => M [cvvResultText] => Match. [cpcIndicator] => [authorizationCode] => 36148A [authorizedAmount] => [cardType] => Visa [description] => [invoiceNumber] => [customerId] => [descriptor] => [tokenData] => [transactionId] => 1015515167 [clientTransactionId] => [responseCode] => 00 [responseText] => APPROVAL [referenceNumber] => 634716268137 [_header:protected] => HpsTransactionHeader Object ( [gatewayResponseCode] => 0 [gatewayResponseMessage] => Success [responseDt] => 2016-12-12T01:11:30.3404285 [clientTxnId] => ) )

Then I use above txnID in the capture

$CreditService->capture('1015515167','50.00','10.00');

with Following response

HpsReportTransactionDetails Object ( [issuerTransactionId] => [issuerValidationCode] => [originalTransactionId] => 0 [maskedCardNumber] => 401200******0016 [settlementAmount] => [transactionType] => 1 [transactionUTCDate] => 2016-12-12T07:11:30.34Z [exceptions] => [memo] => [invoiceNumber] => [customerId] => [transactionStatus] => A [avsResultCode] => 0 [avsResultText] => AVS Not Requested. [cvvResultCode] => M [cvvResultText] => Match. [cpcIndicator] => [authorizationCode] => 36148A [authorizedAmount] => 50.00 [cardType] => Visa [description] => [descriptor] => [tokenData] => HpsTokenData Object ( [tokenValue] => [expMonth] => [expYear] => [cvv] => [responseCode] => [responseMessage] => ) [transactionId] => 1015516527 [clientTransactionId] => [responseCode] => 00 [responseText] => APPROVAL [referenceNumber] => 634716268137 [_header:protected] => HpsTransactionHeader Object ( [gatewayResponseCode] => 0 [gatewayResponseMessage] => Success [responseDt] => 2016-12-12T01:12:04.9649875 [clientTxnId] => ) )

But it doesn't showing me anything like gratuity in the response How to check that if gratuity is deducted or not.

from heartland-php.

bony-corcrm avatar bony-corcrm commented on August 27, 2024

Thanks for reply It works.

from heartland-php.

Related Issues (18)

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.