Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Robin Hislop

    (@tramuntana)

    First of all, I forgot to say thank you for developing this free plugin.
    I have managed to make the plugin work with WooCommerce 2.1.3 by changing the following lines in class.epdq.php:

    Line 427:

    return array('result' => 'success', 'redirect' => add_query_arg('order',
                $order->id, add_query_arg('key', $order->order_key, $order->get_checkout_payment_url( $on_checkout = true )))
            );

    Lines 451-4:

    'ACCEPTURL'=>$order->get_checkout_order_received_url(),
            		'DECLINEURL'=>$order->get_checkout_order_received_url(),
            		'EXCEPTIONURL'=>$order->get_checkout_order_received_url(),
            		'CANCELURL'=>$order->get_checkout_order_received_url(),

    This works perfectly on the test environment, but fails on the live environment with an “unknown order/1/s/” error in the ePDQ error log. This error means the SHA hash of the fields does not match. My SHA-IN value is identical in the settings and in the ePDQ admin. What am I doing wrong?

    hi Robin,

    Did you manage to resolve this, I have also made the edits too a different EPDQ plugin (no supported anymore) and Im getting the exact same error.

    Many Thanks
    J

    Thread Starter Robin Hislop

    (@tramuntana)

    Nope, sorry I’ve not resolved it. Using PayPal at the moment…

    Ah bummer thanks for the reply, if I manage to implement a fix I will let you know.

    Hi Robin,

    I’ve managed to manipulate a plugin I used http://www.smoothwave.co.uk/wordpress/plugins/woocommerce-barclays-payment-gateway/ and got that working fine.

    I implied the fix you mentioned and commented out this :-

    $this->payment_form_data["DECLINEURL"] = $order->get_cancel_order_url()

    Seems this field was the culprit that was messing up the SHA-pass due to the characters in it. Once I commented thta out it worked fine.

    Hope this helps you.

    Yes I noticed that abit steep for a gateway!

    If it is any help I did play with another EPDQ plugin this morning and applied your fix with just one change I think it maybe the plugin you have but it went straight to the gateway without problems :-

    http://wordpress.org/support/topic/barclay-epdq-payment-gateway-for-wordpress-not-working-with-woocommerce-212-213?replies=5

    After liasing with Barclays it is down to the SHA data before it is encrypted thats makes a mismatch between the site and barclays. I made that edit above and follow there two rules :-

    Use a SHA IN passphrase with only alpha numeric characters to eliminate possibility of character encoding issues.

    Modify your code to hard code a string with the same values in to ensure no issues with importing variables

    Obviously I am happy digging and playing around, but if you are uncomfortable then it probably would be best getting the client to cough up.

    Hope you get this resolved
    J

    Thread Starter Robin Hislop

    (@tramuntana)

    OK, that sounds promising. Before I implement this, can you paste the code where your plugin is setting the following please: ACCEPTURL, DECLINEURL, EXCEPTIONURL, CANCELURL, BACKURL, HOMEURL and CATALOGURL

    Many thanks for your help.

    Hi Robin,

    In the class.epdq.php in the EPDQ gateway I didnt change any of that but it reads as follows on line 451 – 457

    'ACCEPTURL'=>$this->notify_url,
    'DECLINEURL'=>$this->notify_url,
    'EXCEPTIONURL'=>$this->notify_url,
    'CANCELURL'=>$this->notify_url,
    'BACKURL'=>get_permalink($this->back_url),
    'HOMEURL'=>get_permalink($this->home_url),
    'CATALOGURL'=>get_permalink($this->cat_url),

    All I filled out in the plugins backend was the PSPID and SHA-IN password

    Thread Starter Robin Hislop

    (@tramuntana)

    Strange, I had to change lines 451-4 to:

    'ACCEPTURL'=>$order->get_checkout_order_received_url(),
    'DECLINEURL'=>$order->get_checkout_order_received_url(),
    'EXCEPTIONURL'=>$order->get_checkout_order_received_url(),
    'CANCELURL'=>$order->get_checkout_order_received_url(),

    to enable endpoints for the plugin to work with WooCommerce 2.1x.

    I’ll try this with alphanumeric SHA-IN and OUT. Will update how it goes.

    Thread Starter Robin Hislop

    (@tramuntana)

    Wow, setting the SHA-IN and OUT keys to be alphanumeric worked! It must have been a special character encoding issue then. Thank you!

    One last glitch I’ve got to iron out – if the customer cancels an order on the Barclays page, they get taken back to the site with an order confirmation message. I assume this is because of the following line:
    'CANCELURL'=>$order->get_checkout_order_received_url(),
    I tried changing it to:
    'CANCELURL'=>$order->get_cancel_order_url(),
    but this caused an error on the Barclays page.

    Ah great stuff, yeah definately doesnt like unusual characters anywhere in the encryption.

    I assume this was the same as my DECLINEURL that it didnt like either. If its on the barclays side can it not be set in the EPDQ area? As passing the cancel url in with the encryption before it even gets to Barclays is where the problem lies.

    To be fair I only got it to the gateway on your plugin so I didnt go as far to testing the cancel url etc so Im advising a little blind here. I cant remember where you cancel the order on the gateway.

    Got it working with Robin Hislop’s solution! Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Not compatible with WooCommerce 2.1.x’ is closed to new replies.