Blockchain-Receive-Payments-API-Shopping-Cart icon indicating copy to clipboard operation
Blockchain-Receive-Payments-API-Shopping-Cart copied to clipboard

Callback issues

Open michaelsomerville opened this issue 7 years ago • 10 comments

Been trying to figure this out for 3 hours, maybe I a little slow ... lol

There never seems to be a callback - so the DB doesn't update at all. We didn't change anything the code, just wanted to test your system and work with it after we see it complete in flow. Everything works, but no callback ever.

michaelsomerville avatar Nov 07 '17 05:11 michaelsomerville

Is your server catching errors, and have you checked your debug log? I'll see if I can try it this weekend to reproduce the error.

coinables avatar Nov 07 '17 05:11 coinables

In the process right now, of debugging .. I'll let you know lol

michaelsomerville avatar Nov 07 '17 06:11 michaelsomerville

Getting this from blockchain ...

https://api.blockchain.info/v2/receive/callback_log?callback=http%3A%2F%2Ft.MYSITE.com%2Fblockchain%2Fcallback.php%3Finvoice%3Dd4f779a5571f8c48b643b4245f6b02ef%26secret%3Dcashmunkey&key=MYAPIKEY
array(1) { [0]=> array(4) { ["callback"]=> string(107) "http://t.MYSITE.com/blockchain/callback.php?invoice=d4f779a5571f8c48b643b4245f6b02ef&secret=cashmunkey" ["calledAt"]=> int(1510034729000) ["responseCode"]=> int(401) ["rawResponse"]=> string(511) "
Authorization Required

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the reques" } }

michaelsomerville avatar Nov 07 '17 06:11 michaelsomerville

Check your email and see if they sent you an authorization request email when you first tried the callback. You have to whitelist your servers IP, login to blockchain.info and go to your settings, there should be a spot to enter your servers IP and add it to the whitelist.

On Nov 6, 2017 10:09 PM, "michaelsomerville" [email protected] wrote:

Getting this from blockchain ...

`https://api.blockchain.info/v2/receive/callback_log? callback=http%3A%2F%2Ft.MYSITE.com%2Fblockchain%2Fcallback.php%3Finvoice% 3Dd4f779a5571f8c48b643b4245f6b02ef%26secret%3Dcashmunkey& key=9f50aa4e-a35b-4c3d-9779-6abd7af71198 array(1) { [0]=> array(4) { ["callback"]=> string(107) " http://t.MYSITE.com/blockchain/callback.php?invoice= d4f779a5571f8c48b643b4245f6b02ef&secret=cashmunkey" ["calledAt"]=> int(1510034729000) ["responseCode"]=> int(401) ["rawResponse"]=> string(511) " Authorization Required

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the reques" } }`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coinables/Blockchain-Receive-Payments-API-Shopping-Cart/issues/10#issuecomment-342385445, or mute the thread https://github.com/notifications/unsubscribe-auth/AK8jGcxvt_UY1sdwnh1O6HYoY1xing0kks5sz_QEgaJpZM4QURaB .

coinables avatar Nov 07 '17 06:11 coinables

Okay, I got it to send - but for some reason it's only hitting once and that's it.

[ {
  "callback" : "http://XXXX.com/apitesting/bc-api/callback.php?invoice_id=22&secret=XXXX",
  "calledAt" : 1510207257000,
  "responseCode" : 200,
  "rawResponse" : "Waiting for confirmations"
} ]

michaelsomerville avatar Nov 09 '17 08:11 michaelsomerville

If I remember correctly, bc.info will stop firing callbacks on a transaction once the callback page responds with ok.

On Nov 9, 2017 12:04 AM, "michaelsomerville" [email protected] wrote:

Okay, I got it to send - but for some reason it's only hitting once and that's it.

[ { "callback" : "http://XXXX.com/apitesting/bc-api/callback.php?invoice_id=22&secret=XXXX", "calledAt" : 1510207257000, "responseCode" : 200, "rawResponse" : "Waiting for confirmations" } ]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coinables/Blockchain-Receive-Payments-API-Shopping-Cart/issues/10#issuecomment-343076771, or mute the thread https://github.com/notifications/unsubscribe-auth/AK8jGU6QA1wcRZNDGQ8qBWpw03-7Dhmzks5s0rIigaJpZM4QURaB .

coinables avatar Nov 09 '17 12:11 coinables

Yeah, but I haven't shown them ok lol so ...

michaelsomerville avatar Nov 09 '17 18:11 michaelsomerville

It sends the first time, then logs what I have above ...


[ {
  "callback" : "http://XXXX.com/apitesting/bc-api/callback.php?invoice_id=22&secret=XXXX",
  "calledAt" : 1510207257000,
  "responseCode" : 200,
  "rawResponse" : "Waiting for confirmations"
} ]

Everything is prefect on my end, when I test and debug. The api callback never sends or comes to the url again after that. There is no " OK " shown and you can see that from the log I pasted here.

I have a logger on the file to track if the server sends again, but never does.

michaelsomerville avatar Nov 09 '17 19:11 michaelsomerville

I have a callback delay issue. It takes 4-6 hours to be fired the callback function. Any idea about the problem?

mmt78 avatar Nov 03 '18 11:11 mmt78

I am having issue with Blockchain call back from last week. It stopped working 6 days ago.

let me explain the steps how exactly i am doing.

Generating address (https://api.blockchain.info/v2/receive?xpub=$xpub&callback=$callback_url&key=$key) Balance Updates (https://api.blockchain.info/v2/receive/balance_update) with confirmations, callback, onNotification, op, addr, key. Made payment for above created address. Payment confirmed at Blockchain and also showing confirmations counter but not getting any confirmation on callback URL. Also tried to get "Callback Logs" but getting null/ empty array.

It is happening from last week. Don't know what Blockchain change at their side.

Please help me to resolve this issue.

Harpreetsinghbedi avatar Feb 09 '21 11:02 Harpreetsinghbedi