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 number

{
  "id": id record in our table
  "customer_id": customer id
  "transaction_id": transaction id
  "amount": amount that user paying
  "created_at": "
  "updated_at": 
  "reservation_id": reservation id
  "omise_charge_id": omise charge id (Reference Number of GB Prime Pay used for void and refund(based on their website))
  "status": status payment
  "source_id": source id
  "paid_at": paid time
  "voucher_transaction_id": gift card transaction id
  "reference_no": reference number(transaction ID on GbPrimepay)
  "ticket_transaction_id": vim transaction id
}

Audit data:

Version: x (version number)

  • Log: xxxxx (Log number)
{
  "id": audited data id
  "auditable_id": cc transaction id
  "auditable_type": "Externals::Omise::Charge",
  "associated_id": 
  "associated_type": 
  "user_id": user id
  "user_type": user type (User, Admin)
  "username": user name
  "action": type of action (Created, Updated)
  "audited_changes": {} -> list of updated data
  "version": version number
  "comment": audit comment
  "remote_address": ip address
  "created_at": 
  "request_uuid": 
}

CC / QR Code detail

Table source (app/models/externals/omise/source.rb), it stores raw data from GB Primepay or Omise if the payment is QR code, then content attribute has qrcode attribute. content is a JSON field. so it's dynamic. the value could be changed to any keys. Example for QR code:

{
  "id": cc or qr transaction id
  "omise_source_id": omise source (payment gateway source)
  "source_type": source type (cc, promptpay, vendor_payment)
  "content": {
    "referenceNo": reference number(hungryhub transaction id on gbprimepay)
    "qrcode": QR code
    "resultCode": result code
    "gbpReferenceNo": gb primepay reference number
    "resultMessage": payment result message
  },
  "created_at": 
  "updated_at": 
  "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
  }
}