• The PayPal Express Checkout button on product pages worked perfectly. Since 1 or 2 days we are facing the following error:

    `Error: No value passed to payment
    decorate/</this.memoizedToken<@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:24404:39
    promise_ZalgoPromise</_proto.dispatch@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:1016:48
    promise_ZalgoPromise</_proto.then@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:1053:18
    decorate/<@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:24400:65
    resultValue@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:9986:37
    listenForMethods</</<@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:7031:36
    promise_ZalgoPromise</ZalgoPromise.try@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:1169:33
    listenForMethods</<@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:7030:40
    _RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.REQUEST]/<@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:6454:28
    promise_ZalgoPromise</ZalgoPromise.try@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:1169:33
    _RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.REQUEST]@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:6451:33
    receiveMessage@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:6520:60
    messageListener@https://www.paypalobjects.com/api/checkout.js?ver=1.14.0:6542:23
    c@https://www.waermebild24.com/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js:1:9405

    _RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.RESPONSE]@https://www.paypalobjects.com/api/checkout.js:6484:27
    receiveMessage@https://www.paypalobjects.com/api/checkout.js:6520:60
    messageListener@https://www.paypalobjects.com/api/checkout.js:6542:23`

    PayPal Express as payment method on cart checkout page seems to work correctly.

    Can you assist?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @greeneye55,
    If possible, try to do a test by changing your active theme.
    Regards

    Hello, I have the same problem but with my local, unsupported by Paypal Currency only. We use Paypal Standart and we have a code snippet for BGN. It works perfectly with Paypal Standard but not with YITH PayPal Express Checkout for WooCommerce. Please advise!
    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;
    }

    Hi,

    Same problem for me only on the product page since i switch on php 8, all it’s ok with 7.4.

    Inside the consol :

    POST https://xxxxxxx/?wc-ajax=yith_paypal_ec_add_to_cart 500 jquery.min.js?ver=3.6.0:1
    ….

    Thanks in advance for your work.
    Damien

    • This reply was modified 2 years, 5 months ago by damiend1.

    Hi!

    Same problem here.
    PHP 7.4
    Works in cart, but not on product page.

    checkout.js throws error:
    Uncaught Error: No value passed to payment

    Regards

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