Git Product home page Git Product logo

checkout-woocommerce-plugin's Issues

Using $order->payment_complete($transaction_id) instead of update_post_meta...

Hi,

Using $order->payment_complete($transaction_id) is the correct way to to set an order to "processing" and reduce stock. This will make it more compatible with Woocommerce and other plugins.

update_post_meta( $order_id, '_transaction_id', $result['action_id'] );

update_post_meta($order_id, '_transaction_id', $action['0']['id']);

update_post_meta($order_id, '_transaction_id', $result['id']);

update_post_meta($order_id, '_transaction_id', $result['id']);

update_post_meta( $order_id, '_transaction_id', $result['id'] );

update_post_meta($order_id, '_transaction_id', $result['action_id']);

update_post_meta( $order_id, '_transaction_id', $result['action_id'] );

Might have miss some but these should be updated to using $order->payment_complete($transaction_id).

Thanks

Undefined Index: on card_verification, Logic should be improved.

if ( 'error' === $result['card_verification'] ) {
WC_Checkoutcom_Utility::wc_add_notice_self( __( 'Unable to add payment method to your account.', 'checkout-com-unified-payments-api' ), 'error' );
wp_redirect( $result['redirection_url'] );
exit;
}
// Redirect to my-account/payment-method if card verification successful.
// show notice to customer.
if ( 'Card Verified' === $result['status'] && isset( $result['metadata']['card_verification'] ) ) {
$this->save_token( get_current_user_id(), $result );
WC_Checkoutcom_Utility::wc_add_notice_self( __( 'Payment method successfully added.', 'checkout-com-unified-payments-api' ), 'notice' );
wp_redirect( $result['metadata']['redirection_url'] );
exit;
}

Line 565 with if ( 'error' === $result['card_verification'] ), created an notice error Undefined index: card_verification

So what should be actually checked here? $result['card_verification'] or $result['metadata']['card_verification'] ? OR both?

Adding filter to get_request_param

Hi,

Is it possible for you to add_filter to "return $payment;" to WC_Checkoutcom_Api_request::get_request_param so that we can modify the setting on the fly? We need it to only set 3d secure for a certain group of users.

Thanks

Javascripts loaded on homepage / product page / product category page / shop archive page

function callback_for_setting_up_scripts() {

// Load on Cart, Checkout, pay for order or add payment method pages. if ( ! is_cart() && ! is_checkout() && ! isset( $_GET['pay_for_order'] ) && ! is_add_payment_method_page() ) { return; }
This code does not work too well because the mini cart will cause the homepage / shop archive / category / product pages to become "is_cart()" true.

Improvements

  • Enqueue https://pay.google.com/gp/p/js/pay.js script only if google pay is enabled.
  • Add support for any custom checkout fields in ApplePay JS, for example we have a field with name mobile/email which breaks ApplePay popup from working, 1 line fix added to the applepay filed fixed it: if(name === 'mobile/email') { return true; }
  • Show Fawry even if current currency is not EGP, our store supports multiple gateways we don't use EGP as main currency, but we have a converter that makes currency switch to EGP upon Fawry selection. This way we're supporting multiple currencies. issue found in if ($value == 'fawry' && $currencyCode == 'EGP' && $countryCode == 'EG') {
  • Remove shipping label in ApplePay popup unless shipping is set.
  • Add discount label in ApplePay popup if exists.
  • Add fees label in ApplePay popup if exists.
  • Add tax label in ApplePay popup if exists.

Suspected Fraud status is never used

The plugin has a built in feature which would help to stop fraud transactions.

So far this status was never used by the plugin even though many fraud attempts were manually detected by our team.

Pre-Release problem with Terms and Conditions

In the Pre-Release, if the merchant does not have a terms and conditions added it can not go to the next step when clicking the "Place Order" button. When pressing it, there is an error telling the user that they need to accept the terms and conditions even if there is not terms and condition check box.

Apple Pay Gone?

Seems like it's commented out. Are you planning to re-add it?

Hiding the refund button for other plugins' payment methods

This is not the same. The problem is your code is hiding the refund button for other plugins' payment methods.

So you are hiding "Adyen" & "PayPal"'s refund button.

Hey @valmedia Thank you for reporting an issues.

We have just released new version 4.4.0 with new improvements. One of them is we have now enabled refund functionality for APMs.

We are closing this issue for now as its resolved. If we missed something please leave comment and we will take a look.

Originally posted by @valmedia in #265 (comment)

New version showing php error

I am using checkout.com WordPress plugin for a store. Yesterday when I updated the plugin to v4.3.9, it started showing PHP error. I had to rollback to previous version. Can you check what's the issue with latest version.

Sandbox Not Completing Payment Transaction

woocommerce-checkout-non-pci-gateway

Sandbox is not completing the payment transaction. The transaction status is showing as what is configured/defined in wp-admin ex. "On Hold" or "Processing". While Live is completing the transaction directly.

Since the "Payment Action" is set to "Authorize and Capture" for Sandbox, it should complete or reject the transaction.

wctransaction
wccheckoutconfig

ApplePay 422 Error

Hi, we're getting this error in the latest 4.1.6.

The endpoint did not accept the request. (Code: 422)

Note that in 4.1.0 ApplePay works fine.

I checked channels settings and app webhooks are selected.

Update: looks like an SDK error: checkout/checkout-sdk-php#44

Settings Wiped Out Upon Saving

When saving main settings it saves fine, but when moving to another tab (Card Settings) and save those, main settings get wiped out!

Duplicate orders with latest plugin update

We are having lots of duplicate orders ever since upgrading to latest version. Ever since rollback to older version, we have not seem new duplicate orders (2 hours right now since rollback).

Internal Server Error!

[13-Dec-2022 18:34:22 UTC] PHP Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php73) in /home/1111/public_html/wp-content/plugins/checkout-com-unified-payments-api/includes/class-wc-gateway-checkout-com-google-pay.php on line 141
[13-Dec-2022 18:34:22 UTC] PHP Fatal error: Uncaught Error: Call to a member function getTokensClient() on null in /home/11111/public_html/wp-content/plugins/checkout-com-unified-payments-api/includes/api/class-wc-checkoutcom-api-request.php:637
Stack trace:

Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\choose_handler()

GuzzleHttp is conflicting with many other plugins. I am unable to update to the latest version.

To check the conflicts, install & activate one of these plugins googleanalytics, mailjet-for-wordpress

There could be many other plugins that can conflict on GuzzleHttp, it will be good if you can prefix the namespace and then use it.

PHP Notice: Undefined variable: is_mada_token

If error reporting is set to show notices (display_errors = 1) the plugin does break the checkout:

PHP Notice: Undefined variable: is_mada_token in /var/www/html/wp-content/plugins/woocommerce-gateway-checkout-com/includes/class-wc-gateway-checkout-com-cards.php on line 232

This leads to

if(is_mada == 1){ if(this.value === ' Notice: Undefined variable: is_mada_token in /var/www/html/wp-content/plugins/woocommerce-gateway-checkout-com/includes/class-wc-gateway-checkout-com-cards.php on line 232 '){

Few Issues

Hi there, we have noticed few issues in the plugin.

1. Duplicate stock reduction:

This is due to manually handling stock using wc_reduce_stock_levels function.

A single function can take care of stock, status, and empty cart instead: $order->payment_complete(); - as per WC docs: https://docs.woocommerce.com/document/payment-gateway-api/

2. Callback and webhook overlapping:

We noticed that some orders get completed or fulfilled twice! Upon further tracking it turns out that the webhook sometimes runs for callback-fulfilled orders (3d secure enabled). It's very hard to replicate this issue but we applied a quick fix that seem to fixed it so far: adding sleep(15); at the beggining of WC_Checkout_Com_Webhook class

Hope these get fixed so we can upgrade safely.

Input to Add Channel ID in the Core Settings Tab

There's a required field by the name Processing Channel ID for which there is no input box in the Core Settings Tabs... I looked up the code but found it only on the Models... There doesn't seem to be a place where the User itself actually enters it...

As we are not Passing the Processing Channel ID the API returns response code 422 which is an Invalid Parameter...

{"request_id":"$request_id_here","http_status_code":422,"error_details" {"request_id":"$request_id_here","error_type":"request_invalid","error_codes":["processing_channel_id_required"]},"http_metadata":{}}

Add confirmation option for buyers to choose to save their card

Actual Behaviour:

For now when the "Use saved cards" functionality is enabled in the plugin, buyers' cards card IDs are automatically saved in WooCommerce.

Expected Behaviour:

When the "Use saved cards" functionality is enabled, buyers should have the option (through a checkbox for example) to choose to save their card for future purchases on checkout.

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.