• Resolved glocsw

    (@glocsw)


    Hi,
    thanks for the plugin.

    The paypal trow an error without &currency param.

    Add to the js url code, pls:

    $options[‘currency_code’]

    function plugin_scripts() {
            if (!is_admin()) {
                global $post;
                if(is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'checkout_for_paypal')){
                    $options = checkout_for_paypal_get_option();
                    wp_enqueue_script('jquery');
                    wp_register_script('checkout-for-paypal', 'https://www.paypal.com/sdk/js?client-id='.$options['app_client_id'], array('jquery'), null);
                    wp_enqueue_script('checkout-for-paypal');
                }        
            }
        }

    temporary solution for users:

    in Settings page, in the “Client ID” fields, after the ID code, add the
    &currency=HUF
    text and it works 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Noor Alam

    (@naa986)

    @glocsw, I’m not sure why it’s necessary. The currency code that you specify in the settings is used in the button. Have you not done that?

    Hi,

    the currency is in the button code, but in console:

    Uncaught Error: Unexpected currency: HUF passed to order.create. Please ensure you are passing /sdk/js?currency=HUF in the paypal script tag.

    Plugin Author Noor Alam

    (@naa986)

    @glocs, Thanks. This looks like a PayPal bug. According to their documentation, you should be able to specify a different currency in each button.

    I have just released an update with a temporary fix. Please update the plugin and let me know how it goes.

    Hi,

    it’s ok now with version 1.0.2

    Thx,
    G

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PayPal script need “currency” parameter’ is closed to new replies.