0
votes

I have a Wordpress site(4.9.6) running Woocommerce(3.4.2) and GTpay(Custom plugin for a bank in my country) woocommerce payment plugin. The problem is simple but annoying. On redirect from the payment gateway, after a successful transaction, an error occurs. Initially it usually just froze before redirecting to an empty cart page with no status message whatsoever. now it throws this error: woocommerce fatal error message heres the code in the payment plugin throwing the error;

 if ($respond_code == "00") {
                #payment successful
                $respond_desc = $response_decoded->ResponseDescription;
                $message_resp = "Approved Successful.";
                $message_resp .= "<br> $respond_desc";
                $message_resp .= "<br>Transaction Reference: $tranxid";
                $message_type = "success";
                $order->payment_complete();
                $order->update_status('completed');
                $order->add_order_note('GTPay payment successful: ' . $message_resp);
                $woocommerce->cart->empty_cart();
                **$redirect_url = $this->get_return_url($order);**
                wc_add_notice($message_resp, "success");
                WC_GTPayUtility::post_to_url(base64_decode($this->nxt) . "gtpay|" . $reff);

I've gone through woocommerce source to check if the function has been deprecated. I've also downgraded the woocommerce version as far back as 3.0.0 but throws the same error. Any help would be much appreciated

PS. Ive contacted the maintainer, he has put off maintenance and support to the very far future, so no help there also

1

1 Answers

0
votes

For anyone that ventures here in the hereafter, i ended up writing my own plugin.

The problem however was simply that woocommerce core had updated and/or deprecated a load of functions... makes sense, right?