Files
shafi-VM b879a54250 fix(hitpay): respect zero-decimal currencies when charging and storing (#30039)
HitPay's payment-requests API takes `amount` as a decimal string in major
units, so the integration divided by 100 on the way out and multiplied by 100
on the way back in. Both conversions were unconditional, but the price input
writes the amount through `convertToSmallestCurrencyUnit`, which stores
zero-decimal currencies unscaled.

For the three zero-decimal currencies HitPay offers — JPY, KRW and VND — a
¥10,000 event therefore asked HitPay to collect ¥100. The two unconditional
conversions cancelled out in the database, so the Payment row and the booker's
page both still showed ¥10,000 while only 1% was charged, and `refund()` is
not implemented for this app.

Route both directions through the shared helpers so the amount charged matches
the amount stored and displayed. Currencies with a minor unit are unaffected;
the added tests pin USD and SGD to their existing behaviour.
2026-09-04 15:39:40 +05:30
..
2026-04-15 09:52:36 -03:00
2025-01-20 15:36:23 +01:00
2026-04-15 09:52:36 -03:00
2026-04-15 09:52:36 -03:00
2025-01-20 15:36:23 +01:00
2025-01-20 15:36:23 +01:00

Obraining HitPay API key and Salt

  1. Create a HitPay Sandbox or HitPay, if you don't have one.
  2. Sign into your HitPay Sandbox or HitPay
  3. On the left side bar, go to API Keys page by clicking on API Keys.
  4. Under API Keys on the right side screen, copy API Keys and Salt and paste them to API Keys and Salt on the HitPay app setup page respectively, while installing or updating the app.