? ????? ???? (All Articles)
E-Commerce & Fintech

PayHere ?? Online Payment Gateways ????? ?????? E-commerce Website ???? ??????? ?????? ??????

PayHere Payment Gateway Sri Lanka Guide

????? ?????? E-commerce ?????????? ??????? ??????????????? ????? ???? ?????? ??????? ??????? ????? Cash on Delivery (COD) ????????? ?????? ???? ????? ???????. ??????????? order ?? reject ????? ?? return ??? ???? courier fees ?????? ??? ???? ??????. ??? ???? ?????? Online Payment Gateway ???? ??????? ???????? ??? ?????? 100% ??? ??????? ???.

PayHere ??? ?????? ?? ?? ???????? ????

PayHere ??? ????? ???? ?? ?????? (Central Bank of Sri Lanka) ?????? ??????? ???? ??? ???? ????????? Aggregate Payment Gateway ???????. ??? ??? integration ?????? ?????????????? ?????? ????? ????? ?????????? PayHere ????? ??????? ????:

????? 1: PayHere Merchant Account ???? ????? ?????

PayHere ????? ??????? ?? ?????? ??? ????????? ????????????? ?????????? ?? ????? ?????. ?????? ??????? ??????????:

  1. Business Registration (BR) ??????.
  2. ?????????? ????? ??? Corporate Bank Account ??? Bank Statement ?? Passbook ???????.
  3. ??????????????? ????? ?????????? (NIC) ?? ????? ???? ????????.
  4. Terms & Conditions, Privacy Policy ?? Refund Policy ?????? ????? ???? ???????.

????? 2: Technical Integration Architecture

PayHere ??????????? ????? ????? 4 ???? ??????? ??????? checkout flow ???? ?????:

  1. Checkout Form: ??? website ????? amount ??, order ID ?? ?? customer details ????? PayHere checkout URL ??? POST request ???? ????.
  2. Payment Modal: ??????????? PayHere ??????? gateway ?? ??? ?? card details ?????? ?? OTP ?? ????????? ????.
  3. Return URL: ????? ?????? ?? ??? ??????????? ???? ??? ???? ?????? 'Thank You' ?????? redirect ??.
  4. IPN (Instant Payment Notification): PayHere ???????????? ??? backend API ??? server-to-server webhook ???? ??? ????? ??????? ?? ?? ?????? ????.
?? Pro Tip: MD5 Hash Security Signature

????? ????? client-side JavaScript ????? ????? order status ?? "Paid" ??? update ???????. PayHere ?????? ??? ??? Merchant Secret ?? ?????? ?? hash signature ?? server-side ????? calculate ?????:

hash = strtoupper(md5(merchant_id + order_id + payhere_amount + payhere_currency + strtoupper(md5(merchant_secret))))

IPN webhook ??? ????? hash ?? ??? server ??? generate ?? hash ??? ???? ??? ????? order ?? deliver ?????? ????? ????. ??? Man-in-the-Middle ??????? ????????????? ???????.

Sandbox Testing ?? Live Deployment

PayHere ????? Sandbox mode ?? ?????? ??? ??? ???, dummy credit card numbers ?????? ?????? checkout ???????????, email notifications ?? database updates ?????? ???? ?????? ?????? ???? ??????? ?? ????? ???. ??????????? ??? Sandbox credentials ?????? Live Merchant ID ?? ?? Secret ?? ???? production ??? deploy ?? ???.

??? Website ????? PayHere Integration ???? ?????? ????????

Infinite Creative ???? E-Commerce Package ?? ??? PayHere, WEBXPAY ?? Direct Bank IPG ???????? setup ?? ??? 3?? ????? ???????? ??? ?? ???? ????.

?? PayHere Setup ??? ??????? (+94 78 971 4912)