Comments (1)
Unable to reproduce.
PHP code
try {
$request = AuthnetApiFactory::getJsonApiHandler(
AUTHNET_LOGIN,
AUTHNET_TRANSKEY,
AuthnetApiFactory::USE_DEVELOPMENT_SERVER
);
$response = $request->getTransactionDetailsRequest([
'transId' => '40067511400'
]);
} catch (Exception $e) {
echo $e;
exit;
}
JSON Response
{
"transaction": {
"transId": "40067511400",
"submitTimeUTC": "2021-06-16T22:50:01.42Z",
"submitTimeLocal": "2021-06-16T15:50:01.42",
"transactionType": "authCaptureTransaction",
"transactionStatus": "capturedPendingSettlement",
"responseCode": 1,
"responseReasonCode": 1,
"responseReasonDescription": "Approval",
"authCode": "SRE1JF",
"AVSResponse": "Y",
"cardCodeResponse": "P",
"order": {
"purchaseOrderNumber": "456654",
"invoiceNumber": "1324567890",
"description": "this is a test transaction",
"discountAmount": 0.0,
"taxIsAfterDiscount": false
},
"authAmount": 5.00,
"settleAmount": 5.00,
"tax": {
"amount": 4.26,
"description": "level2 tax"
},
"shipping": {
"amount": 4.26,
"description": "level2 tax"
},
"duty": {
"amount": 8.55,
"description": "duty description"
},
"lineItems": [
{
"itemId": "1",
"name": "vase",
"description": "Cannes logo",
"quantity": 18.00000,
"unitPrice": 45.00,
"taxable": false,
"taxRate": 0.0,
"taxAmount": 0.0,
"nationalTax": 0.0,
"localTax": 0.0,
"vatRate": 0.0,
"alternateTaxRate": 0.0,
"alternateTaxAmount": 0.0,
"totalAmount": 0.0,
"discountRate": 0.0,
"discountAmount": 0.0,
"taxIncludedInTotal": false,
"taxIsAfterDiscount": false
},
{
"itemId": "2",
"name": "desk",
"description": "Big Desk",
"quantity": 10.00000,
"unitPrice": 85.00,
"taxable": false,
"taxRate": 0.0,
"taxAmount": 0.0,
"nationalTax": 0.0,
"localTax": 0.0,
"vatRate": 0.0,
"alternateTaxRate": 0.0,
"alternateTaxAmount": 0.0,
"totalAmount": 0.0,
"discountRate": 0.0,
"discountAmount": 0.0,
"taxIncludedInTotal": false,
"taxIsAfterDiscount": false
}
],
"taxExempt": false,
"payment": {
"creditCard": {
"cardNumber": "XXXX1111",
"expirationDate": "XXXX",
"cardType": "Visa"
}
},
"customer": {
"id": "18",
"email": "[email protected]"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"shipTo": {
"firstName": "China",
"lastName": "Bayles",
"company": "Thyme for Tea",
"address": "12 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"recurringBilling": false,
"customerIP": "192.168.1.1",
"product": "Card Not Present",
"marketType": "eCommerce",
"networkTransId": "9E2ABXXQA4LDBPMTL5I9SK3",
"authorizationIndicator": "final"
},
"transrefId": "46745146",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
Output
<table>
<tr>
<th>Transaction</th>
<td>
<b>ID</b>: <?php echo $response->transaction->transId; ?><br>
<b>Type</b>: <?php echo $response->transaction->transactionType; ?><br>
<b>Status</b>: <?php echo $response->transaction->transactionStatus; ?><br>
<b>Authorization Code</b>: <?php echo $response->transaction->authCode; ?><br>
<b>AVS Response</b>: <?php echo $response->transaction->AVSResponse; ?><br>
</td>
</tr>
</table>
from authnetjson.
Related Issues (11)
- Namespacing for Exception folder isn't quite right. HOT 3
- Fatal error: Unsupported operand types in authnetjson-php56\src\authnet\AuthnetJsonRequest.php on line 159 HOT 1
- Error when trying to create webhook or getting notification for ARB with webhooks HOT 1
- CURL Class not found HOT 2
- Suggestion: more robust error code / message handling HOT 2
- AuthnetJsonResponse.php getErrorText() & getErrorCode() bug HOT 6
- Incorrect updateWebhook DocBlock Summary HOT 2
- Cannot retrieve useful error messages in AuthnetWebhooksRequest HOT 4
- Compatibility with latest Authorize.net Changes HOT 1
- Webhook returned as not valid if apache_request_headers isn't defined HOT 2
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 authnetjson.