Code: Select all | Expand
cRetData := {"transactionResponse":{"accountCardType":"VS","accountEntryMethod":"PinpadKeyed","accountExpiryDate":"XXXX","amount":"1.55","amountBalance":"","amountProcessed":"1.55","amountTaxed":"0.00","amountTipped":"0.00","approvalNumberResult":"OK6875","avsResponseCode":"","avsResponseText":"","batchNumber":"0","billingName":"","cashier":"","createdOn":"2023-02-15T00:04:35.813Z","customerId":"","cvvResponseCode":"","cvvResponseText":"","externalTransactionId":"f0270891-08da-4b1b-9a7d-5863f490b7d9","isPartialApproval":false,"maskedAccount":"************9016","resultMessage":"Approved","resultStatus":"true","transactionReference":"","transactionType":"CreditSale","uniqueTransId":"f1766ec228104c71a55ce0cd84ddaf72-00000000000000000000000000000000"}}
Code: Select all | Expand
// Obtain and save the results -or- Parse the results by line
hb_JsonDecode( cRetData, @hChgData )
XBROWSER HASHTREE( hChgData, 0 ) TITLE "Hash as Tree"
// Parse the results
cTermID := HB_HGET( hChgData, "cashier") // Terminal ID
cRefCode := HB_HGET( hChgData, "maskedAccount") // Credit card number
fccddat := HB_HGET( hChgData, "createdOn") // Transaction date full string 2016-08-25T15:28:11-05:00 C 8
I'm sure there is a solution ... probably a simple modification.
Thanks.