Bitcoin Forum
May 22, 2024, 01:56:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: blockcypher.com API PHP - Not receiving any POST variables on callback  (Read 1427 times)
icanscript (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
March 15, 2015, 08:05:45 PM
 #1

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
mriou
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
March 16, 2015, 12:12:21 AM
 #2

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.
icanscript (OP)
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
March 16, 2015, 08:08:37 AM
 #3

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
RussianRaibow
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500

I AM A SCAMMER


View Profile WWW
October 31, 2015, 06:17:12 PM
 #4

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?

I AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMER
mriou
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
October 31, 2015, 06:51:34 PM
 #5

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.
RussianRaibow
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500

I AM A SCAMMER


View Profile WWW
October 31, 2015, 07:25:57 PM
 #6

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?

I AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMER
RussianRaibow
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500

I AM A SCAMMER


View Profile WWW
November 23, 2015, 08:47:00 PM
 #7

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 ?

I AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMER
mriou
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 23, 2015, 09:12:42 PM
 #8

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.
bjalkidottir
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
November 23, 2015, 10:28:35 PM
 #9

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.
RussianRaibow
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500

I AM A SCAMMER


View Profile WWW
December 09, 2015, 11:45:57 PM
 #10

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] ?

I AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMERI AM A SCAMMER
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!