1) Have an ECPay merchant account (特店). For tests, the test merchant ECPay publishes on its developer site (merchant ID 3002607, with its HashKey and HashIV) works without an account.
2) In the back office of ECPay, open 系統開發管理, 系統介接設定, and note your merchant ID, HashKey and HashIV.
3) Install this plugin with the Joomla extension manager and enable it.
4) In HikaShop, make sure your shop sells in New Taiwan dollars (TWD): the method only shows for orders in TWD.
5) In HikaShop, go to System > Payment methods, click New and choose the ECPay plugin.
6) Choose the environment, fill in the merchant ID, the HashKey and the HashIV, choose the payment methods, publish the method and save.
7) Nothing is needed in ECPay's back office for the notifications: your shop sends their address with each order. Your shop must be reachable from the internet, on port 80 or 443.
Configuration
Environment: Test sends the payments to ECPay's test environment, where nothing is charged; Live to the real one. Use the merchant ID, HashKey and HashIV of the same environment.
Merchant ID: your 特店編號 at ECPay, digits only.
HashKey and HashIV: the keys of step 2, which sign every message between your shop and ECPay.
Credit check code: optional, for card refunds: the 商家檢查碼 in ECPay's back office, 信用卡收單, 信用卡授權資訊. With it, the plugin reads the state of the card payment at the bank and cancels or refunds it the right way; without it, it tries a cancellation, then a refund.
Payment methods: "All the methods of my account" lets the customer choose on ECPay's page; a single method sends the customer straight to it.
Hidden methods: with all the methods, the ones ECPay's page must not offer.
ATM: days to pay: from 1 to 60. Empty: 3, ECPay's default.
Convenience store code: minutes to pay: from 1 to 43200 (30 days), used when the method is the convenience store code. Empty: 10080 (7 days), ECPay's default.
Barcode: days to pay: from 1 to 30, used when the method is the barcode. Empty: 7, ECPay's default.
Payment page language: automatic (the language of the order) or always the one chosen.
Notification URL: the address ECPay sends its notifications to, shown for information. It cannot be changed.
Debug: writes every order sent, every notification and every call to ECPay to the payment log of HikaShop.
Pending status: the status of an order waiting for its ATM, convenience store or barcode payment, "pending" by default.
Invalid status: the status of an order whose payment failed, "cancelled" by default.
Verified status: the status of a paid order, "confirmed" by default.
Refunded status: giving an order paid by card this status cancels or refunds its payment at ECPay, "refunded" by default.
Troubleshooting
ECPay's page says "CheckMacValue Error" (10200073): the HashKey or the HashIV does not match the merchant ID, or they belong to the other environment.
The method does not show at the checkout: the cart is not in New Taiwan dollars, or the merchant ID, HashKey or HashIV is missing.
Orders stay unpaid although the customer paid: ECPay cannot reach your shop (a local address, a firewall, a port other than 80 or 443). Card payments are still confirmed when the customer comes back; for the others, use the "Check the payment at ECPay" button on the order.
"The status was not changed: ECPay did not refund the card payment": ECPay's answers follow; a refund is not possible on ECPay's test environment, and the credit check code helps pick the right action.
Payments by ATM, convenience store or barcode are refunded from ECPay's back office, not from HikaShop: the plugin tells you so when you give such an order the refunded status.
ECPay blocks a shop that asks it too many questions in a short time for 30 minutes: use the check button only when needed.