refund/void/credit (and auth/capture) are unimplemented stubs that silently return CANCELED
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 33/100
Research direction
Stubs live in src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessPaymentPluginApi.java (authorize L72, capture L82, void L219, credit L230, refund L241). Read purchasePayment first to see how the GoCardless payment id is stored (first payment reference plus paymentId plugin property); refund and credit then use the pinned SDK's RefundService, void the pending_submission cancel action. authorize/capture should raise PaymentPluginApiException rather than return CANCELED. See #43 for asynchronous refund state and the existing tests for expectations.
Written by the indexing model from the issue text.
Description
Problem
Five of the seven PaymentPluginApi transaction methods are stubs. They ignore their arguments, never call GoCardless, and unconditionally return PaymentPluginStatus.CANCELED:
| Method | Line |
|---|---|
authorizePayment |
L72 |
capturePayment |
L82 |
voidPayment |
L219 |
creditPayment |
L230 |
refundPayment |
L241 |
Only purchasePayment talks to the gateway.
Why this matters
Refunds are the significant gap. GoCardless supports refunds against a collected payment (POST /refunds), and the pinned SDK already exposes RefundService. Today a refund issued in Kill Bill silently reports CANCELED while no money moves — the operator gets no error telling them the operation was not performed, and Kill Bill and GoCardless diverge. Any real deployment needs refunds.
Credit maps naturally onto the same RefundService, or onto a payout depending on the semantics wanted.
Void has no meaningful equivalent once a collection is submitted, but a GoCardless payment in pending_submission can be cancelled (POST /payments/:id/actions/cancel), which is the closest analogue and is worth wiring up.
Auth/capture genuinely does not exist in bank debit schemes — there is no authorization hold. These two should stay unimplemented, but should say so explicitly.
Proposed work
- Implement
refundPaymentagainstRefundService, resolving the GoCardless payment id from the transaction (it is already stored —purchasePaymentwrites it as the first payment reference and as apaymentIdplugin property). - Implement
creditPayment, deciding explicitly whether it maps to a refund or a payout. - Implement
voidPaymentas a payment cancellation, valid only while the payment has not yet been submitted; return a clean error otherwise. - For
authorizePayment/capturePayment, throwPaymentPluginApiExceptionstating the operation is not supported by bank debit schemes, rather than silently returningCANCELED.
Point 4 applies to all of them: a stub that reports CANCELED is indistinguishable from a genuine gateway-side cancellation. Unsupported operations should be loud.
Note that refund state is asynchronous too, so this overlaps with #43 — a refund is not final when the API call returns.
- Dominant language
- Java
- Stars
- 4
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from killbill/killbill-gocardless-plugin
-
Migrate from deprecated Redirect Flows to Billing Requests (blocked on gocardless-pro SDK upgrade)Open
Difficulty 4/5 3-5 days Newbie friendliness 18/100
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
-
Webhooks not implemented: processNotification is a stub, async scheme events are never recordedOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
All issues in killbill/killbill-gocardless-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
RegistryExceptionHandler uses self-referencing basePackageClasses instead of a controller classOpenbug finsim-registry good-first-issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug level:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
exoego/keycloak-fuhito#666 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
hammy275/immersive-mc#669 ·