Comments (4)
@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.
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.
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.
Thanks for reply It works.
from heartland-php.
Related Issues (18)
- Convenience Fee/Shipping HOT 2
- Missing/incorrect exception error codes HOT 4
- Cannot charge 0 dollar transaction HOT 3
- CentOS 6.7 curl version 7.19.7 SSL Handshake Issue HOT 2
- Charge request throws Unexpected response error HOT 8
- Scalar type hints are available only in PHP 7 HOT 3
- Details passed in as the 5th param of a charge call aren't returned in the HpsAuthorisation HOT 3
- Which Method I use for CreditAdditionalAuth in HpsCreditService HOT 3
- Apple Pay HOT 1
- A Reflected XSS vulnerability in this sdk HOT 1
- echeck Payment failes HOT 1
- inefficient autoloader HOT 2
- transactionsStatus? HOT 1
- How can I get the transactions Batch Numbers and Batch Status? HOT 5
- How can I get Transaction Fee from transaction ID using API? HOT 1
- Is it possible to get the payment card bin number as part of the charge response? HOT 1
- We found out that we can use Heartland, but we have to use each storeโs merchant ID to access their individual Heartland accounts.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heartland-php.