Closed kares closed 9 years ago
It looks like a bug in the Stripe plugin actually.
https://github.com/killbill/killbill-stripe-plugin/blob/master/lib/stripe/api.rb#L129: gateway
should now be lookup_gateway(options[:payment_processor_account_id])
. I must have overlooked it when I upgraded it to the latest version. Could you try and verify it does the trick?
have some issues locally with the plugin ... seems to start yet it's not registered, anyhow tried on EC2 and :
Caused by: org.killbill.billing.payment.api.PaymentApiException: Failed to update payment method for account d0a80a57-d629-4f6c-b368-9386fce5ab90 : wrong number of arguments calling `options` (0 for 1)
at org.killbill.billing.payment.core.PaymentMethodProcessor$11.doOperation(PaymentMethodProcessor.java:397) ~[killbill-payment-0.12.1.jar:na]
at org.killbill.billing.payment.core.PaymentMethodProcessor$11.doOperation(PaymentMethodProcessor.java:381) ~[killbill-payment-0.12.1.jar:na]
at org.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:219) ~[killbill-payment-0.12.1.jar:na]
at org.killbill.billing.payment.core.PaymentMethodProcessor.setDefaultPaymentMethod(PaymentMethodProcessor.java:381) ~[killbill-payment-0.12.1.jar:na]
... 68 common frames omitted
... also I do not need this working ASAP - I'll just use isDefault=true
The complete patch would look like:
options = properties_to_hash(properties)
payment_processor_account_id = options[:payment_processor_account_id] || :default
gateway = lookup_gateway(payment_processor_account_id)
well almost - seems I run into method (API) changes ... this really needs a spec :)
{"className":"org.killbill.billing.payment.api.PaymentApiException","code":7019,"message":"Internal payment error : Failed to update payment method for account eaa8d5aa-02a1-4a39-89a9-dc136f982b58 : wrong number of arguments calling save_response_and_transaction
(4 for 5)","causeClassName":"org.killbill.billing.payment.api.PaymentApiException","causeMessage":"Failed to update payment method for account eaa8d5aa-02a1-4a39-89a9-dc136f982b58 : wrong number of arguments calling save_response_and_transaction
(4 for 5)","stackTrace":[]}
https://gist.github.com/kares/957ffe253e01af672247
sorry for the late response, but I still needed to try remotely ... localhost still has issues with the plugin being not registered (although after git pull it seemed promising) - have not looked into it since I do not need it that much yet.
this really needs a spec :)
Indeed...
Let me know if I can help with the registration issue.
have not tried latest 3.2 ... it's something I've run into on 3.1.12 while using the endpoint :
PUT /1.0/kb/accounts/{accountId:\w+-\w+-\w+-\w+-\w+}/paymentMethods/{paymentMethodId:\w+-\w+-\w+-\w+-\w+}/setDefault
request :
payment method was previously created (using killbill-stripe-plugin 0.2.1) :
not sure if this should have been reported against the stripe repo - feels like an API issue from a quick look