• WooCommerce Custom Currencies 1.4.1
    WooCommerce 2.1.6

    This shows in paypal logs. I have set currency that replaces existing currency in WooCommerce, but I have set conversion rate to EUR so I can use it for PayPal.

    I have tried enabling “Convert order total” option, but it double converts the amount for PayPal (bug ?) and the “Payment error: Currencies do not match” still occurs.

    https://www.ads-software.com/plugins/woocommerce-custom-currencies/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author GalalAly

    (@galalaly2)

    Hello,

    Thank you for your detailed instructions.

    I haven’t tested the plugin with WC 2.1.x yet. I will issue an update as soon as I can.

    Sorry for the inconvenience.

    Plugin Author GalalAly

    (@galalaly2)

    Hello,

    I’ve just tested the plugin with WP3.8 and WC2.1.7 and it’s working fine with the default Paypal payment gateway.

    What it does.

    Say I have base currency in USD and if I want to convert it to GBP, it will do that conversion. Plus will paypal accept GBP instead of base currency USD.

    Using WP 3.9
    Woocommerce 2.1.8

    Plugin Author GalalAly

    (@galalaly2)

    If the currency that you’re using as a base currency is already supported by PayPal the plugin will not function the way it’s intended with the non-supported paypal currencies.

    So if you have USD as your base currency (supported by PayPal) and want to convert it to GBP for PayPal, it won’t work as intended.

    Any advice on how one can overcome that ‘Currencies do not match’ error?

    I don’t see a hook to edit the currency or amount on an outgoing order to PayPal, which updates the order. Theoretically you could edit the order before it goes out, no?

    Plugin Author GalalAly

    (@galalaly2)

    Hello,

    Do you have the same case mentioned above?

    My case is VND->USD

    WooCommerce has VND built in, but it doesn’t allow it with PayPal – it disables the gateway completely.

    Plugin Author GalalAly

    (@galalaly2)

    Hello,

    Please contact me [email protected]

    Please mention the versions of WooCommerce and WordPress that you’re using and if possible, please provide an admin account.

    Hi GalalAly,

    Your plugin is fantastic added stars in plugin review.

    hopefully we’ll have some improvement.

    Added currency : ‘VND’
    the local payment gateway will accept it (requires plugin) and its good

    Wth Paypal
    VND is changed to USD, paypal transaction completes successfully but WC updates status as

    'on-hold', 'Validation error: PayPal currencies do not match (code %s).'

    WC Log shows this

    Payment error: Currencies do not match (sent "VND" | returned "USD")

    WC thinks it had actually sent VND and got USD in return.
    Is WC aware that ‘VND’ was converted to ‘USD’ ?

    WC checks things here

    woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php line:786

    // Validate currency
    if ( $order->get_order_currency() != $posted['mc_currency'] ) {
        if ( 'yes' == $this->debug ) {
            $this->log->add( 'paypal', 'Payment error: Currencies do not match (sent "' . $order->get_order_currency() . '" | returned "' . $posted['mc_currency'] . '")' );
        }
    
        // Put this order on-hold for manual checking
        $order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal currencies do not match (code %s).', 'woocommerce' ), $posted['mc_currency'] ) );
        exit;
    }

    I need something like :

    if  $order->get_order_currency() is-not-equals-to $posted['mc_currency']
    
      then check 
    
            if the $posted['amt'] value returned by paypal is-equals-to ( value of product x conversion rate )
    
               tell woocommerce order that this is ok to have $order->update_status is everything fine

    maybe something like this

    add_filter (‘woocommerce_payment_complete_order_status’, ‘my_change_status_function’);
    
    function my_change_status_function ($order_id) {
    $order = new WC_Order($order_id);
    //Do whatever additional logic you like before….
    return ‘completed';
    }

    reference : https://chrislema.com/automating-woocommerce-order-status-changes/

    GalalAly, I’ve sent you a file .. please check it.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Paypal Payment error: Currencies do not match’ is closed to new replies.