Changeset 3429302
- Timestamp:
- 12/29/2025 09:37:00 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
melon-payment-gateway/trunk/assets/js/melon-modal.js
r3428370 r3429302 3253 3253 3254 3254 // Amount should be in naira (e.g., 950.00) 3255 const amountInNaira = parseFloat(amount) || 0; 3255 // Clean input: remove commas and convert to number, then back to string for API 3256 const cleanedAmount = String(amount || '').replace(/,/g, ''); 3257 const amountInNaira = parseFloat(cleanedAmount) || 0; 3256 3258 3257 3259 // Validate amount … … 3275 3277 // Build request body - source is required per API docs 3276 3278 // Note: order_channels is NOT a valid parameter (API rejects it) 3277 // Amount is in naira (e.g., 950.00)3279 // Amount must be sent as a STRING (API requirement) 3278 3280 const requestBody = { 3279 3281 public_key: publicKey, 3280 amount: amountInNaira ,3282 amount: amountInNaira.toFixed(2), 3281 3283 method: method, // 'melon' or 'gateway' 3282 3284 melon_id: cleanPhone,
Note: See TracChangeset
for help on using the changeset viewer.