Saturday, 28 September 2013

why coinbase callback url not working?

why coinbase callback url not working?

i have the below code for button creation. public function
createButton($name, $price, $currency, $custom=null,
$options=array(),$callback) { //
$callback=$this->generateReceiveAddress("http://www.tgigo.com");
// print_r($callback);exit;
$params = array(
"name" => $name,
"price_string" => $price,
"price_currency_iso" => $currency,
"callback_url"=>"http://www.tgigo.com"
);
if($custom !== null) {
$params['custom'] = $custom;
}
foreach($options as $option => $value) {
$params[$option] = $value;
}
return $this->createButtonWithOptions($params);
}
public function createButtonWithOptions($options=array())
{
$response = $this->post("buttons", array( "button" => $options ));
if(!$response->success) {
return $response;
}
$returnValue = new stdClass();
$returnValue->button = $response->button;
$returnValue->embedHtml = "<div class=\"coinbase-button\"
data-code=\"" . $response->button->code . "\"></div><script
src=\"https://coinbase.com/assets/button.js\"
type=\"text/javascript\"></script>";
$returnValue->success = true;
return $returnValue;
}
and i have the below response for above code.
{"success":true,"button":{"code":"675cda22e31b314db557f0538f8ad27e","type":"buy_now","style":"buy_now_large","text":"Pay
With Bitcoin","name":"Your Order #1234","description":"1 widget at
$100","custom":"my custom tracking code for this
order","callback_url":"http://www.tgigo.com","price":{"cents":100000,"currency_iso":"BTC"}}}
using this code payment process completed,but not redirected to the call
back url. any one please help me.
Thanks in advance :)

No comments:

Post a Comment