• Resolved dinartdata

    (@piyushagrawal)


    Hello,

    Everything is going good with Vipps integration on our site..
    We are adding 2% transaction cost on Cart Total, it is working on normalcheckout but when it comes to Express checkout there is not options to add transaction cost.
    On code I can see that Shipping cost is added but how can I add Vipps payment getway transaction charnge, so that it is paid by customer.
    Regards,
    DinArt Data Norge.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    The order is created with a custom function ‘create_partial_order’ in the WC_Vipps_Gateway class. The reason for this is that the normal checkout order creation requires a shipping method to be present.

    This may change in the future (replacing the current ‘partial’ orders with standard orders with pro forma shipping methods), but in the meantime you can hook into the action

    ‘woocommerce_checkout_update_order_meta’ (the standard filter)

    or use

    ‘woo_vipps_before_process_payment’ ($order_id) and check WC_Gateway_Vipps::instance()->$express_checkout (which should be true).

    I realize this is clumsy; would it be better to create a new action ‘woo_vipps_express_checkout_order_created’ to modify the order after creation? I can add this fairly quickly if preferred.

    Thread Starter dinartdata

    (@piyushagrawal)

    Thank you for respons..
    Yes, adding new action would be cleaner option, I can add custom code on function.jsp for action “woo_vipps_express_checkout_order_created”

    If you can do this quickly then that will be nice.

    Plugin Author Iver Odin Kvello

    (@iverok)

    I’ll look into it ASAP and create some more actions for this usecase.

    Plugin Author Iver Odin Kvello

    (@iverok)

    'woo_vipps_before_create_express_checkout_order'
    'woo_vipps_express_checkout_order_created'

    will now run before and after an express checkout order has been created, and before process_payments is run.

    Plugin Author Iver Odin Kvello

    (@iverok)

    This should now actually be fixed from version 1.3.7 on – calculation of fees was indeed missing in express checkout, but is now present. Marking this as resolved.

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

The topic ‘Express checkout, transaction fee’ is closed to new replies.