I am getting bad request exception when adding a payment method in brain tree through kill bill for new tenant.
The API that I am calling is 1.0/kb/accounts/{1}/paymentMethods and below is JSON request body
"{\"name\":\"w19 X\",\"firstNameLength\":3,\"email\":\"w...@test.com\",\"externalKey\":\"74472527\",\"currency\":\"GBP\"}"
Things work fine with 'bob' tenant but fails with new tenant that I have created.
I have verified the brain tree plugin config for 'bob' and new tenant account and they are same.
The exception or the documentation of kill bill is not detail.
Any help is appreciated.
thanks,
Kedar.
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/2f5fb75a-ecd0-4d3b-aa1c-b44d8988b055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I got this from the Linux box and not sure if there is a better way to get logs with more details. Please point to me documentation on how to get the logs
I just did another test; I sent similar request for bob tenant account and another tenant account and get different responses, would you be able to help in finding what is wrong, in below request nonce is invalid (expired).
I am suspecting the issue could be with the new tenant setup but not able to find the issue, your help will be appreciated
**** BOB account request: ****
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Killbill-ApiKey: bob" -H "X-Killbill-ApiSecret: lazar" -H "X-Killbill-CreatedBy: Postman" -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" -H "Cache-Control: no-cache" -H "Postman-Token: fdb1417c-bdac-d7fb-9547-37164140975e" -d '{
"pluginName":"killbill-braintree_blue",
"pluginInfo":{
"properties":[
{
"key":"customer",
"value":"51971342"
},
{
"key":"token",
"value":"53d6fca5-fce5-4efb-8281-66e6b56f6fa0"
}
]
}
}' "http://192.168.44.71:8080/1.0/kb/accounts/32942f20-cded-477d-a01a-f5a708ccf771/paymentMethods"
RESPONSE
{
"className": "org.killbill.billing.payment.api.PaymentApiException",
"code": 7005,
"message": "Failed to add payment method for account 32942f20-cded-477d-a01a-f5a708ccf771 : CVV is required. (81706) Unknown or expired payment_method_nonce. (91732) Postal code is required. (81808)",
"causeClassName": null,
"causeMessage": null,
"stackTrace": []
}
***** OTHER tenant request
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Killbill-ApiKey: sqhMobile3" -H "X-Killbill-ApiSecret: sqhMobile3" -H "X-Killbill-CreatedBy: Postman" -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" -H "Cache-Control: no-cache" -H "Postman-Token: f7fa5cf3-1bc9-1083-6acd-cc8ecf68043f" -d '{
"pluginName":"killbill-braintree_blue",
"pluginInfo":{
"properties":[
{
"key":"customer",
"value":"32085918"
},
{
"key":"token",
"value":"53d6fca5-fce5-4efb-8281-66e6b56f6fa0"
}
]
}
}' "http://192.168.44.71:8080/1.0/kb/accounts/3c475228-d1d1-4661-a7d6-a6ec0a870e13/paymentMethods"
RESPONSE
{
"className": "org.killbill.billing.payment.api.PaymentApiException",
"code": 7005,
"message": "Failed to add payment method for account 3c475228-d1d1-4661-a7d6-a6ec0a870e13 : can't convert Symbol into Integer",
"causeClassName": null,
"causeMessage": null,
"stackTrace": []
}
thanks,
Kedar
I just did another test; I sent similar request for bob tenant account and another tenant account and get different responses, would you be able to help in finding what is wrong, in below request nonce is invalid (expired).
I am suspecting the issue could be with the new tenant setup but not able to find the issue, your help will be appreciated
:braintree_blue:
:merchant_id: ABC
:public_key: DEF
:private_key: GHILooks like the issue was the with the configuration as it had single quote at the beginning.
Below is the command that worked
curl -X POST -H "Accept: application/json" -H "Content-Type: text/plain" -H "X-Killbill-ApiKey: sqhMobile3" -H "X-Killbill-ApiSecret: sqhMobile3" -H "X-Killbill-CreatedBy: Postman" -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" -H "Cache-Control: no-cache" -H "Postman-Token: 892b0718-7db6-93e9-73a4-32c654219813" -d ':braintree_blue:
:merchant_id: yd5tj4y7mxgpynsc
:public_key: w7bf45wc7pdns3jj
:private_key: f03ad35013a910b3e6f8077c3bea402d' "http://192.168.44.71:8080/1.0/kb/tenants/uploadPluginConfig/killbill-braintree_blue"
thanks,
Kedar.