Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter yeray

    (@yeray)

    Hi.

    I managed to find where the problem is. For some reason, you are calculating the status_url for Skrill like this:

    line 467 of file class-wc-gateway-skrill.php
    $this->status_url = str_replace('https:', 'http:', add_query_arg(array('wc-api' => 'WC_Gateway_Skrill'), home_url('/')));

    We only allow https on our domain, and redirect (301) the http requests, but the Skrill guys don’t send the answer back if they get a redirect.

    For now we’ve modified that line and left it like:
    $this->status_url = add_query_arg(array(‘wc-api’ => ‘WC_Gateway_Skrill’), home_url(‘/’));

    And it works! Is there any reason you are changing status_url to http? We can allow http to just that url if there is a reason for it.

    Thread Starter yeray

    (@yeray)

    Hi, thanks for your help.

    I was looking at the code of the plugin, and I think the log line Skrill arguments (JSON) is not generated with the response but with the parameters sent to Skrill (The response would be on Posted data (JSON)).

    It’s on line 699 of class-wc-gateway-skrill.php:

    $this->log(sprintf(__('Skrill arguments (JSON): ', $this->text_domain), json_encode($skrill_args)), true);

    The strange thing is, if I do a

    $this->log(json_encode($skrill_args));

    it will show the arguments correctly. Maybe there is a problem in that line? I think our problem is not there anyways, but maybe you want to take a look at that…

    The JSON with the information sent to Skrill is this:

    {“pay_to_email”:”[email protected]”,”language”:”EN”,”currency”:”EUR”,”return_url”:”https:\/\/ourcompany.com\/checkout\/order-received\/1977?key=wc_order_54ad69c54c8f9″,”cancel_url”:”https:\/\/ourcompany.com\/cart\/?cancel_order=true&order=wc_order_54ad69c54c8f9&order_id=1977&redirect&_wpnonce=38a132514d”,”status_url”:”http:\/\/ourcompany.com\/?wc-api=WC_Gateway_Skrill”,”merchant_fields”:”order_key”,”order_key”:”wc_order_54ad69c54c8f9″,”transaction_id”:1977,”amount”:”119.00″,”amount2″:”119.00″,”amount2_description”:”Order #1977″,”comments”:””,”pay_from_email”:”[email protected]”,”bcompany”:””,”firstname”:””,”lastname”:””,”address”:””,”address2″:””,”phone_number”:””,”postal_code”:””,”city”:””,”state”:””,”country”:””}

    Until I get a Skrill testing user I won’t be able to test more, but I would appreciate if you can point me in the right direction with the information I’ve put there.

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)