Giter Club home page Giter Club logo

Comments (1)

stymiee avatar stymiee commented on August 14, 2024

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>

authcapture
transdetails

from authnetjson.

Related Issues (11)

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.