tokenly / xchain

A public web service for BTC and XCP transactions
5 stars 7 forks source link

webhook endpoint field required for unmanaged addresses #33

Closed cryptonaut420 closed 8 years ago

cryptonaut420 commented 8 years ago

when the newUnmanagedPaymentAddress API method is called from the Client class, it gives an error "the webhook endpoint field is required", see the log below:

[2016-05-09 00:05:05] local.INFO: unmanagedPaymentAddress.created {
    "uuid": "3789ae3a-2748-4a18-bbe6-ba4ad7110efa",
    "user_id": "2",
    "address": "169Pat3WQmEgX5EmjSbd7jdKSnxghfWpeV",
    "id": 43
}
[2016-05-09 00:05:05] local.INFO: account.created {
    "name": "default",
    "payment_address_id": 43,
    "user_id": "2",
    "active": true,
    "uuid": "36641412-4c02-4be2-969d-3f9ef7425599",
    "updated_at": "2016-05-09 00:05:05",
    "created_at": "2016-05-09 00:05:05",
    "id": 42
}
[2016-05-09 00:05:05] local.DEBUG: reconciling accounts for 169Pat3WQmEgX5EmjSbd7jdKSnxghfWpeV (3789ae3a-2748-4a18-bbe6-ba4ad7110efa)
[2016-05-09 00:05:08] local.DEBUG: Crediting 2 CONSULT to account default
[2016-05-09 00:05:08] local.DEBUG: Crediting 1250.369 LTBCOIN to account default
[2016-05-09 00:05:08] local.DEBUG: Crediting 1296 WALMART to account default
[2016-05-09 00:05:08] local.INFO: $address=169Pat3WQmEgX5EmjSbd7jdKSnxghfWpeV AddressValidator::isValid(169Pat3WQmEgX5EmjSbd7jdKSnxghfWpeV)=1
[2016-05-09 00:05:08] local.ERROR: error.api.invalid_request {
    "errors": [
        "The webhook endpoint field is required."
    ]
}

this is happening whenever the syncWithXChain function is called for addresses in Tokenpass, which is causing error pages for address verification and the mobile instant verification.

deweller commented 8 years ago

The webhook endpoint is required when creating an address monitor. This is most likely a bug in tokenpass. Can you move the issue there?

And are you experiencing this issue in the staged environment or in your local development environment? You might need to define the callback URLs in Tokenpass (XCHAIN_CALLBACK_URL and SITE_HOST).

cryptonaut420 commented 8 years ago

oh I see, yeah the issue is you added XCHAIN_CALLBACK_URL environment variable to Tokenpass but I didn't have that actually defined. What route is that supposed to be, and can you make sure that is set properly on production server?