Commit 33983c7
doRefund: send required description, fire alterPaymentProcessorParams, use APIv4 for currency lookup
- Mollie's create-refund API marks 'description' as required; without one
the refund is rejected. Send the caller's description when provided,
otherwise a sensible default. The description may be shown to the
customer (e.g. on their bank statement) depending on the payment method.
- Fire the existing alterPaymentProcessorParams hook before sending, with
an 'action' => 'Refund' marker (removed again after the hook), so
extensions can customise the refund parameters/description the same way
they already can for purchases.
- Resolve the fallback currency via APIv4 FinancialTrxn::get instead of
raw SQL, per the CiviCRM coding standards preference for API access.
Verified live against Mollie (iDeal): refund accepted and re_... id
returned as refund_trxn_id.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 276790e commit 33983c7
1 file changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
330 | 344 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 345 | + | |
336 | 346 | | |
337 | 347 | | |
338 | 348 | | |
| |||
0 commit comments