Bayarcash
Bayarcash
  • Welcome
  • Bank List
    • FPX
    • DuitNow Online Banking/Wallets
  • Portal
    • Portal List
    • Create Portal
  • Payment
    • Payment Channel
    • Payment Intent
    • Payment Intent ID
  • Transaction
    • Callback
    • Transaction ID
    • All Transactions
  • Checksum
    • Checksum Validation
    • Payment Intent
    • Transaction Callback
  • Direct Debit
    • e-Mandate Enrollment
    • e-Mandate Maintenance
    • e-Mandate Termination
    • Callback
    • Mandate ID
    • Mandate Transaction ID
  • Enterprise Partner
    • Merchant Registration
    • Payout Bank List
    • Merchant Status
    • Merchant Payout ID
    • All Merchant Payouts
  • Sitelink
    • GitHub @webimpian
Powered by GitBook
On this page
  1. Checksum

Payment Intent


Sample code using PHP to validate payment intent checksum.

<?php
    $secretKey = 'xxxxx';  // Your API secret key obtain from Bayarcash portal
    
    $payloadData = [
        "payment_channel"  => 1,
        "order_number"     => "ORD-0060",
        "amount"           => "60.00",
        "payer_name"       => "Mohd Ali",
        "payer_email"      => "mohd.ali@gmail.com"
    ];
    
    ksort($payloadData);  // Sort the payload data by key
    $payloadString = implode('|', $payloadData);  // Concatenate values with '|'
    
    $checksum = hash_hmac('sha256', $stringPayload, $secretKey); // Generate HMAC SHA256 checksum

PreviousChecksum ValidationNextTransaction Callback

Last updated 9 months ago