Author

Topic: blockcypher.com API PHP - Not receiving any POST variables on callback (Read 1442 times)

hero member
Activity: 616
Merit: 500
I AM A SCAMMER
Do you want the callbacks to stop at some point or just have a lower number of confirmations than 6? For the latter you can just set enable_confirmations=false and create a webhook yourself with the desired confirmation count.
I want the callbacks to stop at some point. Will it stop at 6 automatically ?

I'd also like to know the difference between [n_tx] & [final_n_tx] ?
newbie
Activity: 7
Merit: 0
Does anyone know how to stop blockcypher callback for every single confirmation after a payment is made through the payment forwarding API with enable_confirmations = true ?

code an if statement to only complete whatever action after x amount of confirmations.
newbie
Activity: 26
Merit: 0
Do you want the callbacks to stop at some point or just have a lower number of confirmations than 6? For the latter you can just set enable_confirmations=false and create a webhook yourself with the desired confirmation count.
hero member
Activity: 616
Merit: 500
I AM A SCAMMER
Does anyone know how to stop blockcypher callback for every single confirmation after a payment is made through the payment forwarding API with enable_confirmations = true ?
hero member
Activity: 616
Merit: 500
I AM A SCAMMER
Not sure what exactly was the issue described above but I'm guessing it was related to decoding the JSON body. The full transaction is sent in the POST body as JSON, make sure you decode that properly with the programming language you're using (for ex in PHP check http://stackoverflow.com/questions/8945879/how-to-get-body-of-a-post-in-php).

Once you can decode the full transaction, the number of confirmations is a property there.

I tested with this...

http://blockcypher.github.io/php-client/sample/doc/payment-api/CreateForwardingAddress.html

When payment is made to the created address, it is getting forwarded with a success callback like...

Code:
Results: Array
(
)


Results: Array
(
    [uniqid] => 54321abcde
)
sample data used

Once callback URL, which contains the following code, is called with this Unique ID...

http://blockcypher.github.io/php-client/sample/doc/payment-api/GetForwardingAddress.html

I am getting the following result...

Code:
Results: Array
(
)


Results: Array
(
    [uniqid] => 54321abcde
    [__utma] => 12.34.56.78.90.12
    [fc] => {"abcd":"1:1234"}
    [pv] => {"d":"1:5432"}
    [__cfduid] => abcde54321
    [_ga] => GA1.2.34.56
    [__utmz] => 98.76.54.32.utmcsr=example.com|utmccn=(referral)|utmcmd=referral|utmcct=/example/
)
sample data used

Now, how do I decipher the above data?
newbie
Activity: 26
Merit: 0
Not sure what exactly was the issue described above but I'm guessing it was related to decoding the JSON body. The full transaction is sent in the POST body as JSON, make sure you decode that properly with the programming language you're using (for ex in PHP check http://stackoverflow.com/questions/8945879/how-to-get-body-of-a-post-in-php).

Once you can decode the full transaction, the number of confirmations is a property there.
hero member
Activity: 616
Merit: 500
I AM A SCAMMER
Hey there, co-founder and CTO of BlockCypher here.

Can you clarify what you mean by GET or POST variables? Callbacks are done using POST requests and the details of the payments are in the body of the POST as a JSON document, not as URL parameters if that's what you were expecting.

Fixed Smiley Thanks for this information Smiley

Could you or anyone can post here how the problem was solved. The callback response is only providing me some garbage value. Moreover, is it possible to have success response only after a certain number of confirmation?
hero member
Activity: 686
Merit: 502
Hey there, co-founder and CTO of BlockCypher here.

Can you clarify what you mean by GET or POST variables? Callbacks are done using POST requests and the details of the payments are in the body of the POST as a JSON document, not as URL parameters if that's what you were expecting.

Fixed Smiley Thanks for this information Smiley
newbie
Activity: 26
Merit: 0
Hey there, co-founder and CTO of BlockCypher here.

Can you clarify what you mean by GET or POST variables? Callbacks are done using POST requests and the details of the payments are in the body of the POST as a JSON document, not as URL parameters if that's what you were expecting.
hero member
Activity: 686
Merit: 502
Hi, (Not sure if this is correct section)

I have been working for someone to create a payment gateway using BlockCypher. Everything seems to work well.... apart from receiving anything on the callback.

I can see the callback happening, But I have not received any GET or POST variables from the callback. Such as TXid, Input Address, Value.

Has anyone experienced a similar issue before? or even used this provider?

Thanks in advance

icanscript
Jump to: