Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter augustus1996

    (@augustus1996)

    The Stripe dashboard.

    Thread Starter augustus1996

    (@augustus1996)

    When adding the payment method does it require us to add the credit card number and details or just the payment method id we have on the order?

    Thread Starter augustus1996

    (@augustus1996)

    Is there a way we can prevent this from happening? this happen in many of our renewal orders. I will contact the subscription plugin but this only happen on the order who are using stripe the paypal one doesn’t have any issue so I think this is related to the woocommerce stripe gateway plugin. Is there a way to prevent this from happening on the other renewal orders? we have a lot of orders that are affected by this.

    Thread Starter augustus1996

    (@augustus1996)

    I don’t see any fatal error related to woocommerce though.

    Thread Starter augustus1996

    (@augustus1996)

    We just update the plugin and re-authenticate it. It’s only happen in some customer, but we do have it to use the legacy checkout experience before but we uncheck it since it will be obsolete.

    Thread Starter augustus1996

    (@augustus1996)

    They have entered they credit card and the previous renewal was successful but when we updated it to the latest version, it seems to have cost a lot of this issue. I tried to revert it back to previous version but when i trigger the retry order payment, i still see the same issue. How can we add the customer object to the stripe? or is there a code we can use to add it automatically?

    Thread Starter augustus1996

    (@augustus1996)

    You are right, this is a free trial subscription.

    Thanks a lot. I think this plugin is really helpful than the official paypal plugin that woocommerce have.

    • This reply was modified 1 year, 9 months ago by augustus1996.
    Thread Starter augustus1996

    (@augustus1996)

    This situation likely arose when an individual utilized PayPal and designated their card as the primary payment option within their PayPal account.

    Thread Starter augustus1996

    (@augustus1996)

    It works now, thanks a lot.

    Thread Starter augustus1996

    (@augustus1996)

    The order status is active or completed, I’ve used the subscription for this and the subscription status is active.

    I do think the getId function on the paypal SDK doesn’t work since that’s causing critical error.

    Thread Starter augustus1996

    (@augustus1996)

    yes you are right the paypal object should not be null, the only thing that is null is the getId() function that is causing the critical error.

    this may have happened because we are not using funnelkit and i think the patch you added is for the site who is using funnelkit if i’m not mistaken.

    i do see my order on the backen order successfully.

    Thread Starter augustus1996

    (@augustus1996)

    I did try to fix it using this method

    
    	/**
    	 * PaymentResult constructor.
    	 *
    	 * @param \PaymentPlugins\PayPalSDK\Order|\WP_Error $paypal_order
    	 * @param \WC_Order                                 $order
    	 * @param AbstractGateway                           $payment_method
    	 * @param string                                    $error_message
    	 */
    	public function __construct( $paypal_order, \WC_Order $order, AbstractGateway $payment_method = null, $error_message = '' ) {
    		if ( is_wp_error( $paypal_order ) ) {
    			$this->success       = false;
    			$this->error_message = $paypal_order->get_error_message();
    			$this->error_code    = $paypal_order->get_error_code();
    		} elseif ( $paypal_order === false ) {
    			$this->success       = false;
    			$this->error_message = $error_message;
    		} else {
    			$this->success         = true;
    			$this->paypal_order    = $paypal_order;
    	
    			if(function_exists('getId')){
    				$this->paypal_order_id = $paypal_order->getId();
    			}
    		}
    		$this->order          = $order;
    		$this->payment_method = $payment_method;
    	}
    Thread Starter augustus1996

    (@augustus1996)

    FYI – I tried removing this line of code, from the pymntpl-paypal-woocommerce/src/PaymentResult.php and I was able to successfully checkout without the “Error processing checkout. Please try again” error. Can you review this. Thanks a lot.

    $this->paypal_order_id = $paypal_order->getId();
    • This reply was modified 1 year, 9 months ago by augustus1996.
    Thread Starter augustus1996

    (@augustus1996)

    I think the issue was related to this
    Here’s the latest version of the plugin that you have

    As you can see here. this function have the paypal_order_id which causing an issue and critical error.

    	/**
    	 * PaymentResult constructor.
    	 *
    	 * @param \PaymentPlugins\PayPalSDK\Order|\WP_Error $paypal_order
    	 * @param \WC_Order                                 $order
    	 * @param AbstractGateway                           $payment_method
    	 * @param string                                    $error_message
    	 */
    	public function __construct( $paypal_order, \WC_Order $order, AbstractGateway $payment_method = null, $error_message = '' ) {
    		if ( is_wp_error( $paypal_order ) ) {
    			$this->success       = false;
    			$this->error_message = $paypal_order->get_error_message();
    			$this->error_code    = $paypal_order->get_error_code();
    		} elseif ( $paypal_order === false ) {
    			$this->success       = false;
    			$this->error_message = $error_message;
    		} else {
    			$this->success         = true;
    			$this->paypal_order    = $paypal_order;
    			$this->paypal_order_id = $paypal_order->getId();
    		}
    		$this->order          = $order;
    		$this->payment_method = $payment_method;
    	}
    

    Compare to the version 1.29

    	/**
    	 * PaymentResult constructor.
    	 *
    	 * @param \PaymentPlugins\PayPalSDK\Order $paypal_order
    	 * @param \WC_Order                       $order
    	 * @param AbstractGateway                 $payment_method
    	 * @param string                          $error_message
    	 */
    	public function __construct( $paypal_order, \WC_Order $order, AbstractGateway $payment_method = null, $error_message = '' ) {
    		if ( is_wp_error( $paypal_order ) ) {
    			$this->success       = false;
    			$this->error_message = $paypal_order->get_error_message();
    		} elseif ( $paypal_order === false ) {
    			$this->success       = false;
    			$this->error_message = $error_message;
    		} else {
    			$this->success      = true;
    			$this->paypal_order = $paypal_order;
    		}
    		$this->order          = $order;
    		$this->payment_method = $payment_method;
    	}
    
    	public function success() {
    		return $this->success;
    	}
    Thread Starter augustus1996

    (@augustus1996)

    2023-06-01T15:11:16+00:00 CRITICAL Uncaught Error: Call to a member function getId() on null in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php:54
    Stack trace:
    #0 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Payments/Gateways/AbstractGateway.php(206): PaymentPlugins\WooCommerce\PPCP\PaymentResult->__construct()
    #1 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1050): PaymentPlugins\WooCommerce\PPCP\Payments\Gateways\AbstractGateway->process_payment()
    #2 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1279): WC_Checkout->process_order_payment()
    #3 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(485): WC_Checkout->process_checkout()
    #4 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-includes/class-wp-hook.php(308): WC_AJAX::checkout()
    #5  in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php on line 54
    
    2023-06-01T17:02:42+00:00 CRITICAL Uncaught Error: Call to a member function getId() on null in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php:54
    Stack trace:
    #0 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Payments/Gateways/AbstractGateway.php(206): PaymentPlugins\WooCommerce\PPCP\PaymentResult->__construct()
    #1 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1050): PaymentPlugins\WooCommerce\PPCP\Payments\Gateways\AbstractGateway->process_payment()
    #2 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1279): WC_Checkout->process_order_payment()
    #3 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(485): WC_Checkout->process_checkout()
    #4 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-includes/class-wp-hook.php(308): WC_AJAX::checkout()
    #5  in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php on line 54
    
    2023-06-01T17:05:52+00:00 CRITICAL Uncaught Error: Call to a member function getId() on null in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php:54
    Stack trace:
    #0 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/Payments/Gateways/AbstractGateway.php(206): PaymentPlugins\WooCommerce\PPCP\PaymentResult->__construct()
    #1 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1050): PaymentPlugins\WooCommerce\PPCP\Payments\Gateways\AbstractGateway->process_payment()
    #2 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1279): WC_Checkout->process_order_payment()
    #3 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(485): WC_Checkout->process_checkout()
    #4 /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-includes/class-wp-hook.php(308): WC_AJAX::checkout()
    #5  in /var/www/thinkslimmer.wpfueledstaging.com/htdocs/wp-content/plugins/pymntpl-paypal-woocommerce/src/PaymentResult.php on line 54
    

    This is what we have on the error log

Viewing 15 replies - 1 through 15 (of 22 total)