mariodian/Geary

Error 500

Closed this issue · 3 comments

S0PEX commented

Hey,

I am trying to implement your geary into my store.
So I have the problem that the page stops working with Callback response status: 500
I could trace down the issue to $order = $geary->check_order_callback();
Then I tried to use you Check order status from Gear's webhook example 1:1 and still getting this error you got an idea why.

Regards Artur

Hi, Mycelium Gear has a bug where every time you change gateway settings it makes your API keys obsolete. You just have to generate new ones and the API should work again.

S0PEX commented

Thanks for the answer, but I allready found my problem.
Although I have php 5.6 php cannot find the function getallheaders.
So I replaced the function with `function get_nginx_headers($function_name='getallheaders'){

$all_headers=array();

if(function_exists($function_name)){

    $all_headers=$function_name();
}
else{

    foreach($_SERVER as $name => $value){

        if(substr($name,0,5)=='HTTP_'){

            $name=substr($name,5);
            $name=str_replace('_',' ',$name);
            $name=strtolower($name);
            $name=ucwords($name);
            $name=str_replace(' ', '-', $name);

            $all_headers[$name] = $value;
        }
        elseif($function_name=='apache_request_headers'){

            $all_headers[$name] = $value;
        }
    }
}


var_dump($all_headers);
return $all_headers;

}`

And fixed the 500 error, but I am getting signature missmatch now

S0PEX commented

My bad found the issue changed some of the code so I had a typo