Only one mandate per account: mandate stored as an account custom field instead of on the payment method
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
Línea de trabajo
Start in src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessPaymentPluginApi.java: addPaymentMethod writes the account custom field near L340 and getMandateId reads it back at L141. Copy the table shape from a sibling plugin's DDL under src/main/resources, add gocardless_payment_methods/gocardless_responses keyed on kb_payment_method_id, resolve the mandate from kbPaymentMethodId in purchasePayment, and implement getPaymentMethods/getPaymentMethodDetail/deletePaymentMethod/resetPaymentMethods. Done when a second payment method keeps its own mandate and existing GOCARDLESS_MANDATE_ID custom fields migrate onto the account's default method.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The GoCardless mandate is stored as a single account-level custom field named GOCARDLESS_MANDATE_ID, rather than being associated with the Kill Bill payment method.
Written in addPaymentMethod:
Read back in getMandateId, which returns the first match and stops:
Consequences
- One mandate per Kill Bill account, permanently. Adding a second payment method attempts to add a second custom field with the same name on the same account, which
CustomFieldApiExceptions — so the second mandate cannot be stored at all. kbPaymentMethodIdis ignored on the payment path.purchasePaymentresolves the mandate fromkbAccountId, never from the payment method it was actually asked to charge. If an account somehow ended up with two payment methods, both would charge the same mandate.- No multi-scheme support. A customer cannot hold, say, a BACS mandate and a SEPA mandate, which is a normal requirement for a business collecting across the UK and the EU.
deletePaymentMethodis a no-op, so the custom field outlives the payment method and the account is left permanently pinned to a stale mandate.getPaymentMethodsalways returns an empty list andgetPaymentMethodDetailreturns an emptyGoCardlessPaymentMethodPlugin, so the mandate is invisible to KAUI and to the API.- No plugin tables. Unlike the other Kill Bill payment plugins, there is no
gocardless_payment_methods/gocardless_responsesschema, so there is nowhere natural to put this.
Proposed work
Adopt the standard killbill-plugin-framework-java shape used by the Stripe/Adyen/Braintree plugins:
- Add DDL for
gocardless_payment_methodsandgocardless_responses(plus_transactionsif useful), keyed onkb_payment_method_id. - Store the mandate id, scheme, customer id and bank account summary on the payment method row, not on the account.
- Resolve the mandate from
kbPaymentMethodIdinpurchasePayment, not fromkbAccountId. - Implement
getPaymentMethods/getPaymentMethodDetail/deletePaymentMethod/resetPaymentMethodsagainst those tables. - Provide a migration for existing installs that moves
GOCARDLESS_MANDATE_IDcustom fields onto the account's default payment method.
Item 5 matters — the custom field is the current production storage, so this cannot be a clean break.
- Lenguaje dominante
- Java
- Estrellas
- 4
- Forks
- 7
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de killbill/killbill-gocardless-plugin
-
Migrate from deprecated Redirect Flows to Billing Requests (blocked on gocardless-pro SDK upgrade)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 33/100
-
Webhooks not implemented: processNotification is a stub, async scheme events are never recordedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Todos los issues de killbill/killbill-gocardless-plugin
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
line/centraldogma#1397 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
cryptomator/hub#515 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vert-x3/vertx-mail-client#268 ·