Giter Site home page Giter Site logo

ccvonlinepayments-woocommerce's People

Contributors

dieterlambrecht avatar petercmdc avatar willem-ccv avatar

Watchers

 avatar  avatar  avatar

Forkers

hogsim

ccvonlinepayments-woocommerce's Issues

Order status management needs improvement

By default all orders are set to "on-hold" with this plugin. They should stay in a "pending" state until the payment is processed. If the payment was not completed successfully or was declined by the customer, the order should be set to "failed". That way the payment can be restarted.

An annoying side effect of this is when a user is redirected with a failed payment, that a thank you page is presented. For Woocommerce "on-hold" means that the order was successful but the payment needs to be manually checked by the store owner. In the case of online payments the customer (un-)deliberately cancels/fails the payment and needs to be able to retry this, without creating a new order from scratch.

For more information about the correct status flow in Woocommerce:

https://docs.woocommerce.com/document/managing-orders/
https://docs.woocommerce.com/document/managing-orders/#troubleshooting

PS: It seems to me that the example gateway for bank transfers, provided by Woocommerce, is used as a starting point for this plugin. This is not correct for online payments like bancontact, mastercard, paypal, ...

For inspiration you could take a look at the plugin provided by Mollie
https://github.com/mollie/WooCommerce

Impossible to use Bank Transfer

Hi,

The plugin is working with all the payments we use.
Except the bank transfer that is giving us this error : There was an unexpected error processing your payment
Screenshot 2022-01-31 at 12 23 50

We dont see anything in our log

critical error when using "sequential ordernumber plugin" with CCV plugin

Wordpress 5.8.2 with WooCommerce 5.9.0,
CCV Online Payments for Woocommerce version 1.3.0
WooCommerce Sequential Order Numbers version Versie: 1.9.5 | Door SkyVerge

Pugin works, but we want a sequential order nummer and not the post ID's, thats why we installed an extra plugin for sequential order numbers, after plugin is installed every new order gives a page with a critical error

url: http://192.168.1.53/wc-api/ccvonlinepayments_return/?order=22&key=wc_order_fGf1NIW02aoQy&payment_id=8
image

(my locale test server)

_post_meta table, has a extra entry with ordernumber
image

_posts table
image

it seems that the CCV plugin cant find the correct orderID

Cart is always emptied with every payment

The cart is always emptied when starting a new payment. When users go back to the webshop with the back button of the browser they will see an empty cart and will need to start all over again.

The cart should only be emptied when the payment was marked as completed. That way users will be able to restart payments without having to search for their products in the webshop again.

in WC_CcvOnlinePayments_Gateway.php there is this section:

$woocommerce->cart->empty_cart()

This issue is probably linked to #1 where the wrong assumption is made that every payment is a bank transfer that needs to be manually checked.

Guests customers can't checkout

This plugin throws some exceptions when a visitor tries to checkout without creating an account.

In WC_CcvOnlinePayments_Gateway.php there is this section:

        /** @var WP_User $userData */
        $userData = get_userdata($order->get_customer_id());
        $paymentRequest->setAccountInfoAccountIdentifier($order->get_customer_id());
        $paymentRequest->setAccountInfoAccountCreationDate(DateTime::createFromFormat('Y-m-d H:i:s', $userData->user_registered));
        $paymentRequest->setAccountInfoEmail($userData->user_email);

New visitors don't have a user account connected. So $order->get_customer_id(() will return "0" by default.
This results in $userData to be blank and $userData->user_registered to fail.

We've temporarily hotfixed this in our application like this:

        /** @var WP_User $userData */
        $userData = get_userdata($order->get_customer_id());
        if($userData) {
            $paymentRequest->setAccountInfoAccountIdentifier($order->get_customer_id());
            $paymentRequest->setAccountInfoAccountCreationDate(DateTime::createFromFormat('Y-m-d H:i:s', $userData->user_registered));
            $paymentRequest->setAccountInfoEmail($userData->user_email);
        }

This needs a permanent solution.

Side question: Is there a particular reason this information needs to be part of the payment processing? All the information below seems superfluous:

            "accountInfo" => [
                "accountIdentifier"     =>  $request->getAccountInfoAccountIdentifier(),
                "accountCreationDate"   =>  $request->getAccountInfoAccountCreationDate(),
                "accountChangedDate"    =>  $request->getAccountInfoAccountChangeDate(),
                "email"                 =>  $request->getAccountInfoEmail(),
                "homePhoneNumber"       =>  $request->getAccountInfoHomePhoneNumber(),
                "homePhoneCountry"      =>  $request->getAccountInfoHomePhoneCountry(),
                "mobilePhoneNumber"     =>  $request->getAccountInfoMobilePhoneNumber(),
                "mobilePhoneCountry"    =>  $request->getAccountInfoMobilePhoneCountry(),
            ],

Fatal error: Uncaught Error: Call to a member function key_is_valid() on bool

I got a fatal error on the function "key_is_valid" after payment redirection.
Our WordPress is setup as multisite, maybe the issue come from there. I had another issue: the "ccvonlinepayments_payments" table was not created for other websites (only on the primary), I resolve it by creating it manually.

Here is the error:
Fatal error: Uncaught Error: Call to a member function key_is_valid() on bool in /wp-content/plugins/ccvonlinepayments/WC_CCVOnlinePayments.php:94 Stack trace: #0 /wp-content/plugins/ccvonlinepayments/WC_CCVOnlinePayments.php(71): WC_CCVOnlinePayments::handleCallback() #1 /wp-includes/class-wp-hook.php(292): WC_CCVOnlinePayments::doReturn('') #2 /wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array) #3 /wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /wp-content/plugins/woocommerce/includes/class-wc-api.php(161): do_action('woocommerce_api...') #5 /wp-includes/class-wp-hook.php(292): WC_API->handle_api_requests(Object(WP)) #6 /wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #7 /wp-includes/plugin.php(551): WP_Hook->do_action(Array) #8 /wp-includes/class-wp.php(388): do_action_ref_array('parse_request', Arr in /wp-content/plugins/ccvonlinepayments/WC_CCVOnlinePayments.php on line 94

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.