Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Charge Audit

Credit Card ID: xxxx

Shows credit card record details.

{
  "id": "record id in our table",
  "customer_id": "customer id",
  "transaction_id": "transaction id",
  "amount": "amount that the user is paying",
  "created_at": "2024-07-01T00:00:00Z",
  "updated_at": "2024-07-01T00:00:00Z",
  "reservation_id": "reservation id",
  "omise_charge_id": "GB Prime Pay reference used for void/refund",
  "status": "payment status",
  "source_id": "source id",
  "paid_at": "payment timestamp",
  "voucher_transaction_id": "gift card transaction id",
  "reference_no": "transaction reference number on GB Prime Pay",
  "ticket_transaction_id": "vim transaction id"
}

Audit data

Version: 1

{
  "id": "audited data id",
  "auditable_id": "cc transaction id",
  "auditable_type": "Externals::Omise::Charge",
  "associated_id": "associated id",
  "associated_type": "associated type",
  "user_id": "user id",
  "user_type": "user type (User, Admin)",
  "username": "user name",
  "action": "action type (created, updated)",
  "audited_changes": "list of updated fields",
  "version": "version number",
  "comment": "audit comment",
  "remote_address": "ip address",
  "created_at": "2024-07-01T00:00:00Z",
  "request_uuid": "request uuid"
}

CC / QR Code detail

Table source (app/models/externals/omise/source.rb) stores raw data from GB Prime Pay or Omise. If the payment is QR code, then the content attribute has a qrcode attribute. content is a JSON field, so it is dynamic.

Example for QR code:

{
  "id": "cc or qr transaction id",
  "omise_source_id": "omise source",
  "source_type": "source type (cc, promptpay, vendor_payment)",
  "content": {
    "referenceNo": "Hungry Hub transaction id on GB Prime Pay",
    "qrcode": "QR code",
    "resultCode": "result code",
    "gbpReferenceNo": "GB Prime Pay reference number",
    "resultMessage": "payment result message"
  },
  "created_at": "2024-07-01T00:00:00Z",
  "updated_at": "2024-07-01T00:00:00Z",
  "qr_code": {
    "url": "QR code link"
  },
  "gb_primepay_card_id": null
}

Example for Credit card:

{
  "id": 648147,
  "omise_source_id": "gb_primepay",
  "source_type": "cc",
  "content": {
    "key": "value",
    "something": "the event contained",
    "amount": "2998.00",
    "gbpReferenceNo": "gbp947161184906678",
    "currencyCode": "764",
    "resultCode": "00",
    "authorizeCode": "003334",
    "eci": "05",
    "threeDsResult": "Y",
    "threeDsVersion": "2.2.0",
    "backgroundSend": "https://r-huginn.hungryhub.com/users/1/web_requests/30/gbprimepayccprodsecret",
    "resultMessage": "Success",
    "debitType": "C",
    "date": "01072024",
    "time": "150935",
    "cardNo": "441770XXXXXX3698",
    "cardType": "VIS",
    "fee": "55.46",
    "vat": "3.88220",
    "paymentType": "C",
    "amountPerMonth": "0",
    "totalAmount": "0",
    "thbAmount": "0",
    "issuerBank": "Kasikornbank Public Company Limited",
    "detail": "Booking 5325562",
    "customerEmail": "sick.sadboy@hotmail.com",
    "merchantDefined1": "Reservation",
    "referenceNo": "5325562_1350",
    "headers": {}
  },
  "created_at": "2024-07-01T08:09:11.000Z",
  "updated_at": "2024-07-01T08:09:42.000Z",
  "qr_code": {
    "url": null
  }
}