killbill / killbill-dwolla-plugin

Plugin to use Dwolla as a gateway
http://killbill.io
Apache License 2.0
0 stars 1 forks source link

plugin could not start, configuration issue #5

Closed Sigura closed 6 years ago

Sigura commented 7 years ago

request to /plugins/killbill-dwolla - 404 Not Found resopnse.

I think because I got error on plugin start, details below.

But I added pair manually:

mysql> select record_id, access_token, refresh_token, account_id from dwolla_tokens;

record_id access_token refresh_token account_id
1 ... ... ...

Settings added:

curl -v \
     -X POST \
     -u admin:password \
     -H 'X-Killbill-ApiKey: bob' \
     -H 'X-Killbill-ApiSecret: lazar' \
     -H 'X-Killbill-CreatedBy: admin' \
     -H 'Content-Type: text/plain' \
     -d 'org.killbill.billing.plugin.dwolla.baseUrl=https://api.dwolla.com/
     org.killbill.billing.plugin.dwolla.baseOAuthUrl=https://www.dwolla.com/oauth/v2/token
     org.killbill.billing.plugin.dwolla.scopes=Send|AccountInfoFull|Funding
     org.killbill.billing.plugin.dwolla.clientId=...
     org.killbill.billing.plugin.dwolla.clientSecret=...
     org.killbill.billing.plugin.dwolla.accountId=...' \
     http://killbill:8080/1.0/kb/tenants/uploadPluginConfig/killbill-dwolla

Error on plugin start:

killbill_1  | Caused by: retrofit.RetrofitError: cannot retry due to redirection, in streaming mode
killbill_1  |   at retrofit.RetrofitError.networkError(RetrofitError.java:27)
killbill_1  |   at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
killbill_1  |   at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
killbill_1  |   at com.sun.proxy.$Proxy144.getToken(Unknown Source)
killbill_1  |   at org.killbill.billing.plugin.dwolla.client.DwollaClient.getApplicationToken(DwollaClient.java:52)
killbill_1  |   at org.killbill.billing.plugin.dwolla.client.DwollaClient.<init>(DwollaClient.java:38)
killbill_1  |   at org.killbill.billing.plugin.dwolla.core.DwollaActivator.start(DwollaActivator.java:44)
killbill_1  |   at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
killbill_1  |   at org.apache.felix.framework.Felix.activateBundle(Felix.java:2154)
k

request works perfect:

curl -v \
    -X POST \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'client_id=...&client_secret=...&refresh_token=...&grant_type=refresh_token' \
    https://www.dwolla.com/oauth/v2/token

tried to change oauth url to url in sample org.killbill.billing.plugin.dwolla.baseOAuthUrl=https://dwolla.com/oauth/v2, error anyway:

killbill_1  | Caused by: retrofit.RetrofitError: 403 Forbidden
killbill_1  |   at retrofit.RetrofitError.httpError(RetrofitError.java:40)
killbill_1  |   at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:388)
killbill_1  |   at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
killbill_1  |   at com.sun.proxy.$Proxy144.getToken(Unknown Source)
killbill_1  |   at org.killbill.billing.plugin.dwolla.client.DwollaClient.getApplicationToken(DwollaClient.java:52)
killbill_1  |   at org.killbill.billing.plugin.dwolla.client.DwollaClient.<init>(DwollaClient.java:38)
killbill_1  |   at org.killbill.billing.plugin.dwolla.core.DwollaActivator.start(DwollaActivator.java:44)
killbill_1  |   at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
killbill_1  |   at org.apache.felix.framework.Felix.activateBundle(Felix.java:2154)

what I doing wrong?

Sigura commented 7 years ago

it makes me crazy, but looks like it starts working with org.killbill.billing.plugin.dwolla.baseOAuthUrl=https://www.dwolla.com/oauth/v2/

this knowledge price - one day of my life. Sorry, I'm out of happy Java world.

Sigura commented 7 years ago

maybe link to a description about how anybody can add debug output for retrofit.RestAdapter will help?