Git Product home page Git Product logo

reepay-woocommerce-payment's Introduction

reepay-woocommerce-payment's People

Contributors

aait avatar adr28095 avatar alexandermur avatar antondrob avatar aydinbk avatar buhlit avatar chnutzen avatar daniel217d avatar dependabot[bot] avatar dimaspolohov avatar markusbrunke avatar maxwhite avatar oleborup avatar robert-mygind avatar runenisbeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

reepay-woocommerce-payment's Issues

Payment confirm action

This functions runs 3 times.

image

LOGS:
05-01-2019 @ 11:18:11 - WC_Gateway_Reepay_Checkout::WC_Gateway_Reepay_Checkout::payment_confirm Incoming data array (
'key' => 'wc_order_RSjlcQMOv53nq',
'id' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
'customer' => 'cust-0009',
'payment_method' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
)
05-01-2019 @ 11:18:12 - WC_Gateway_Reepay_Checkout::WC_Gateway_Reepay_Checkout::payment_confirm Incoming data array (
'key' => 'wc_order_RSjlcQMOv53nq',
'id' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
'customer' => 'cust-0009',
'payment_method' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
)
05-01-2019 @ 11:18:12 - WC_Gateway_Reepay_Checkout::WC_Gateway_Reepay_Checkout::payment_confirm Incoming data array (
'key' => 'wc_order_RSjlcQMOv53nq',
'id' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
'customer' => 'cust-0009',
'payment_method' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
)

webhook when creating a customer is failing in wordpress.

A customer reported the following in their log:

52.18.114.235 - - [25/Apr/2019:00:35:00 +0200] "POST /wc-api/WC_Gateway_Reepay_Checkout/" 500 "-" "reepay-webhook-invoker/864"
52.18.114.235 - - [25/Apr/2019:00:35:00 +0200] "POST /wc-api/WC_Gateway_Reepay_Checkout/" 500 "-" "reepay-webhook-invoker/864"
52.18.114.235 - - [25/Apr/2019:00:35:00 +0200] "POST /wc-api/WC_Gateway_Reepay_Checkout/" 500 "-" "reepay-webhook-invoker/864"

Even if wordpress does not need the webhook event for anything it is important the server still reponse with a 200 ok.

Reepay version 1.3.1 renders Varnish cache useless and slows down site considerably!

The implementation of handling sessions for guest users in pull request: #103 which was released in version: 1.3.1 in woocommerce_init() in reepay-woocommerce-payment.php includes the use of session_start() for all users this is very, very bad for servers using Varnish caching as this sets a cookie for all users upon visiting. The action of setting this cookie on first visit effectively renders Varnish caching useless and significantly increases Time-To-First-Byte (TTFB). Please either remove or rethink the implementation. The culprit is inside this function:

public function woocommerce_init() {
include_once( dirname( __FILE__ ) . '/includes/class-wc-background-reepay-queue.php' );
self::$background_process = new WC_Background_Reepay_Queue();
// Generate guest ID is save it in the session
if ( ! is_user_logged_in() ) {
if ( PHP_SESSION_ACTIVE !== session_status() ) {
session_start();
}
if ( ! isset( $_SESSION['reepay_guest'] ) ) {
$_SESSION['reepay_guest'] = 'guest-' . wp_generate_password(12, false);
}
}

We've seen Varnish hits decrease significantly since updating our sites to Reepay version 1.3.1 and our TTFB has increased by an order of magnitude. Our Varnish hit rates have currently decreased by more than 50% and our response times have increased significantly.

Automatic Capture When Changing Order Status

The plugin doesn't support the automatic capture when changing order status in WooCommerce. If you try to do a bulk-action where you update the order status or just try to manual update the order status under a specific order, it doesn't make the Settle the transaction in Reepay. In the example below, "Reepay Settle" is set to Completed in the settings. When you update the order status from Processing to Completed, it doesn't Settle in Reepay, but stay as Authorized.

image

image

image

image

image

Separate MobilePay Online And ViaBill Payment Method

The plugin doesn't support separate MobilePay Online and ViaBill payment methods. That means at the moment, that you can't choose your preferred payment method directly on the WooCommerce checkout page. See the picture.

image

It would give a better experience if you were able to present for example Mobile Pay Online directly on the WooCommerce checkout page.

image

class-wc-reepay-update.php missing from version 1.1.8

The file class-wc-reepay-update.php seems to be missing from the version 1.1.8 release.

This issue results in the database not being able to update and the notice hanging in the admin panel indefinitely.

Entry from debug.log:
PHP Fatal error: Uncaught Error: Class 'WC_Reepay_Update' not found in /home/account/public_html/wp-content/plugins/reepay-checkout-gateway/reepay-woocommerce-payment.php:353

Screenshot 2019-04-27 at 15 58 24

Auto settle online products

WooCommerce already sets a product to be physical or online. Why not make it even more convenient for merchants, that deal with both physical products, and online products to automatically charge the online products?

Saved Cards Bug

The plugin has a bug with the saved cards. If you buy several products and subscriptions, the card will be saved several times under My Account.

image

Customer already exist, Country is not ISO

We have already implemented a fallback if the plugin experience the error invoice already settled. This fallback function can be activated by enabling Order handle failover in the settings.

Besides this error we also currently experiencing customer already exist and country is not ISO standard. We need similar fallback methods for these errors. E.g. if Reepay response with a customer already exists, create fallback customer cust_1235-1.

Non-static method

Deprecated: Non-static method WC_ReepayCheckout::add_footer() should not be called statically in /var/www/html/wp-includes/class-wp-hook.php on line 286

Double orders since updating to WC plugin 1.4.4

Since updating to Reepay v.1.4.4 we are getting double orders for every order placed by the customer.

There seems to be an issue where and order is created and the first time an invoice is requested from the Reepay API the response returned is a 404 Not Found for that order. Just after this a new order is created and another request to the Reepay API is sent for this invoice - this returns a 200 OK.

Se log trace:

08-31-2021 @ 14:06:39 - Request: GET https://api.reepay.com/v1/invoice/order-MC-41245 []
08-31-2021 @ 14:06:39 - [0.1457] HTTP Code: 404. Response: {"code":31,"error":"Invoice not found","path":"/v1/invoice/order-MC-41245","timestamp":"2021-08-31T12:06:39.359+00:00","http_status":404,"http_reason":"Not Found","request_id":"a90731f1fa3aab7d5d906570c335b34e"}
08-31-2021 @ 14:06:50 - Request: GET https://api.reepay.com/v1/invoice/order-MC-41246 []
08-31-2021 @ 14:06:51 - [0.1287] HTTP Code: 200. Response: {"id":"420272671419c1410794cacc924d788d","handle":"order-MC-41246","customer":"cust-2022","state":"authorized","type":"ch","amount":48800,"number":29263,"currency":"DKK","due":"2021-08-31T11:26:47.852+00:00","authorized":"2021-08-

Add Payment Method Bug

The plugin has a bug when customers try to add a payment method to their existing account under My Account. Nothing happens, when you click at the "Add payment method" button.

image

Partial Capture from WooCommerce

The plugin doesn't support the edit feature, which allows you to change the amount of an order. We can't, of course, allow increasing the amount from for example 4 kr. to 5 kr. but merchant should be able to decrease from for example 4 kr. to 3 kr. like in the example below. You can edit the price in WooCommerce, but Reepay makes a full capture of the first amount.

image

image

image

image

image

image

Customer cannot be changed on invoice - error 99

There have been quite a number of reports of merchants utilising the WC plugin, who have reported the error:

HTTP Code: 400. Response: {"code":99,"error":"Customer cannot be changed on invoice","path":"/v1/session/charge","timestamp":"2020-06-22T12:24:45.258+00:00","http_status":400,"http_reason":"Bad Request","request_id":"b7367a4ddb6896553f402fb6b6a9605e"}

Merchants have mentioned that this has been an ongoing occurrence. As our platform doesn't allow multiple handles with the same customer used by another, the above event is triggered. This seems to be happening more often with what seems only to be with WC.

I've attached a log file which the customer has included.

Note from customer: You can recreate it by going to the checkout, begin a payment, cancel, and go back to the checkout.

Could there be a way around this, so the end-user doesn't get stuck trying to make another purchase on top of an existing handle linked to their session without abandoning their basket and trying again?

Fatal Error

If you deactivate WooCommerce while Reepay Checkout is active, the whole site crashes.

PHP Deprecated notice for statically calling Non-static method

This is currently flooding the logs on a site running PHP 7.2+

PHP Deprecated: Non-static method WC_ReepayCheckout::add_footer() should not be called statically in /home/account/public_html/wp-includes/class-wp-hook.php on line 286

Edit
In reepay-woocommerce-payment.php on line 51
when calling add_action with a static method like this:
add_action( 'wp_footer', __CLASS__ . '::add_footer' );

The function add_footer on line 122 must be declared as static
Change line 122 from:
public function add_footer() {
To:
public static function add_footer() {

Errors from Reepay is no longer being display in Woocommerce checkout

If a customer was met by an error when they were redirected to Reepay, we previously showed a notice in the Woocommerce checkout, which contained the error code from Reepay. We do not do that anymore and instead, Woocommerce checkout just stands and loads without anything happening. This is a bug.

We need to show this notice again.

Issue with partial settles

If you are doing a partial capture and hereafter sets the order to e.g. completed, then the full amount will be charged. So the plugin needs some kind of function to ignore order status on each order. Maybe a checkout you can set for orders that should be affected by the order status.

image

Partial settle when changing order status

At the moment, the Reepay plugin will perform a full settlement if the status on an order is changed from an authorized state to a settled state. Instead, Reepay needs to look at the current total from the order in Woo and settle this specific amount. This will solve issues where orders have been changed and the amount is not the same anymore.

Double authorization + double stock reductions + double emails to customers

There is a race condition between the use of the accept url and the webhook. This sporadically, if the timing is right, results in double authorizations, double notes on orders and double stock reduction calls - which is a nightmare for logistics.

Even though there are checks for a DB value which tries to mitigate this it doesn't prevent the issue (since it's a race condition).

It seems there has been implemented multiple checks, which actually try to verify if a webhook is configured and then only use that. This still doesn't work as intended though. We've verified that our webhook is configured and that the value for this in the database reflects this. When the check is performed it seems that the accept url is still being used however so there must be an issue with reading out the value somewhere.

Adding more logging with regards to what method was used for authorization/refund could help troubleshoot this further.

This Order Is No Longer Editable

The plugin doesn't support the edit feature, if you have set your preferred order status settings to Reepay Authorized = Processing, Reepay Settle = Completed. WooCommerce then says "This order is no longer editable".

image

image

Woocommerce subscription - Allready settled

We have a merchant that is still getting the allready settled error on their invoices. This has been reported before and we need to fix it.

Last time we got the message that:

"It was my mistake, we call the function statically. So the script we ran didn't clean order reference from renewal orders. WooCommerce subscription initially clone orders as renewal orders with metadata saved. So the hook that should remove order reference (of initial order) didn't work. It's fixed now on madstationen.com

I really hope this is the last time they have problems. It's hard because i cannot simulate conditions without cloning their site and that's a lot of job. But I think now it's fixed."

I don't know if it should have been fixed, seems like it is not.

Warning when using strlen on an array

In the referenced code an array is being set on the shipping_address, and right after strlen is used causing an error.
What is the purpose of the strlen check?

if ($order->needs_shipping_address()) {
$params['order']['shipping_address'] = [
'attention' => '',
'email' => $order->get_billing_email(),
'address' => $order->get_shipping_address_1(),
'address2' => $order->get_shipping_address_2(),
'city' => $order->get_shipping_city(),
'country' => $order->get_shipping_country(),
'phone' => $order->get_billing_phone(),
'company' => $order->get_shipping_company(),
'vat' => '',
'first_name' => $order->get_shipping_first_name(),
'last_name' => $order->get_shipping_last_name(),
'postal_code' => $order->get_shipping_postcode(),
'state_or_province' => $order->get_shipping_state()
];
if (!strlen($params['order']['shipping_address'])) {
$params['order']['shipping_address'] = $params['order']['billing_address'];
}
}

PHP Notices

The following notices show up in the debug.log when completing and order:

PHP Notice: Undefined index: invoice in /home/merchcit/public_html/wp-content/plugins/reepay-checkout-gateway/includes/class-wc-gateway-reepay-checkout.php on line 669

PHP Notice: Undefined index: transaction in /home/merchcit/public_html/wp-content/plugins/reepay-checkout-gateway/includes/class-wc-gateway-reepay-checkout.php on line 684

Looks like there are some checks that need to be refined.

Enhanced Usability In WooCommerce Order Page

The plugin doesn't give any information about the payment if you are on the WoCommerce order page and see all your orders. You need to go into each order to see the current Reepay order/transaction status.

Merchants have requested to have the following information/options under the order page. See picture for illustration.

  • Which payment type is used (card icon)
  • Reepay Invoice ID
  • Reepay order status
  • Capture button

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.