Bitcoin Final Step

After the payment transaction complete you will get the data in your application in json format .
At the time request you have to mention :
  • callbackurl
  • success url 
  • cancel url                                                                             
so that after transaction completion it will revert you data in that page. Therefore you can collect it from there.
Put this

$data = json_decode(file_get_contents('php://input'));

Note: Let me tell you very important thing. if you print $data then it won't the result because it is hidden. You need to put data in file and save it at your server. Check that file you have final response in it.

 So for the first time to check the response from bitcoin use this code


$data = json_decode(file_get_contents('php://input')); file_put_contents("cubitlog/my.txt",file_get_contents('php://input').PHP_EOL, FILE_APPEND);

In That response you will get the status that can be "pending","complete","timeout" etc.....

Comments

Popular posts from this blog

Redsys Payment gateway intergration Request

Cubit payment gateway

Cubit/Bitcoin With curl function