• Hi,

    We are experiencing the above problem with the free version of the PayPal Express Checkout for WooCommerce plugin.

    For exaample, when you are on this product: https://imperiumest.eu/product/reborn-gel-cleaner/

    then ‘Add to Bag’ and click Paypal Checkout (at the bottom of he page) we get the error

    Can you tell us how to fix the problem?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Carlos M

    (@cjmora)

    Hi @optimized,

    I suggest you take a look at the plugin documentation and check if everything is correctly configured:
    https://docs.yithemes.com/yith-paypal-express-checkout-for-woocommerce/category/settings/
    Please, let us know.

    Hello,
    I have the same problem but only with my local currency. We are using BGN. As is it an unsupported currency we have a code snippet that works with Paypal standard, but seems not working with YITH PayPal Express Checkout for WooCommerce. Please advise! Thanks a lot! The code is:

    // allow BGN for WooCommerce and PayPal
    add_filter( 'woocommerce_paypal_supported_currencies', 'add_bgn_paypal_valid_currency' );
        function add_bgn_paypal_valid_currency( $currencies ) {
         array_push ( $currencies , 'BGN' );
         return $currencies;
        }
    
    // Convert BGN to EUR for PayPal payments
    add_filter('woocommerce_paypal_args', 'convert_bgn_to_eur');
    function convert_bgn_to_eur($paypal_args){
    	if ( $paypal_args['currency_code'] == 'BGN'){
    		$convert_rate = 1.955; //set the converting rate
    		$paypal_args['currency_code'] = 'EUR'; //change BGN to EUR
    		$i = 1;
    
    		while (isset($paypal_args['amount_' . $i])) {
    			$paypal_args['amount_' . $i] = round( $paypal_args['amount_' . $i] / $convert_rate, 2);
    			++$i;
    		}
    
    		if ( $paypal_args['shipping_1'] > 0 ) {
    				$paypal_args['shipping_1'] = round( $paypal_args['shipping_1'] / $convert_rate, 2);
    				}
    
    		if ( $paypal_args['discount_amount_cart'] > 0 ) {
                    $paypal_args['discount_amount_cart'] = round( $paypal_args['discount_amount_cart'] / $convert_rate, 2);
                    }
                    }
    
                    return $paypal_args;
    }
    
    //this runs when a new note is added to the order
    add_filter( 'woocommerce_new_order_note_data', 'pbte_fix_order_status', 10, 2 );
    
    //if the note says that the PayPal currencies or amounts do not match, then we will change the status to processing
    function pbte_fix_order_status($a_note, $a_order)
    {
        //the check is done in two languages
        if ( strpos($a_note['comment_content'],'PayPal валутите не съвпадат') !== false
        || strpos($a_note['comment_content'],'PayPal currencies do not match') !== false
        || strpos($a_note['comment_content'],'PayPal наличността не отговаря') !== false
        || strpos($a_note['comment_content'],'PayPal amounts do not match') !== false )
        {
            //we create the order var
            $order = new WC_Order($a_order['order_id']);
            //if the current status is on-hold - we change it to processing and add an optional note
            if($order->status == 'on-hold')
                $order->update_status('processing', 'The PayPal BGN support plugin did this note.');
        }
    
        return $a_note;
    }
    Plugin Support Alberto Martin

    (@albertomrtn)

    Hi @maia12345, it seems that this snippet solves the problem with PayPal Standard but not for our plugin, as it is not related to it and there is also a conflict between the currency and our plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error: No value passed to payment’ is closed to new replies.