• Resolved threadi

    (@threadi)


    Hello,

    We have a requirement in a store that with PayPal Express Checkout the customer comes back to the store after payment and can view his order again there and (very importantly) adjust address data. The latter is important from the store operator’s point of view, as experience has shown that many PayPal users have outdated address data and use it for Express Checkout. The address data should be able to be adjusted again after payment.

    Is this possible with your plugin and if so, how?

    Many thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @threadi

    Having the customer review their address and payment info after using express checkout kind of defeats the purpose of using express checkout in the first place.

    Why not just disable express checkout and use PayPal in the payment method section of the checkout page? That way you can ensure the address info entered by the customer is the most up to date.

    Kind Regards

    Thread Starter threadi

    (@threadi)

    Express Checkout speeds up the ordering process for many customers. In the shop in question, this accounts for a large proportion of all purchases. Interestingly, without Express Checkout, sales collapse. Unfortunately, doing without it is therefore not an option.

    Unfortunately, a not inconsiderable number of customers send the wrong/outdated address to the shop, resulting in a large number of subsequent adjustments or even incorrectly sent packages. The aim is to prevent exactly that. Hence the question of whether you can go to a page after the Express Checkout where you can adjust the delivery address again? It could also be the order confirmation page, only with the option to adjust the address?

    Plugin Author Payment Plugins

    (@mrclayton)

    H @threadi

    What you’re describing is not currently supported by the plugin and would require a code change to accommodate your request.

    You can add this address review step using custom code however. You can simply intercept the WooCommerce checkout request and redirect the user to the confirmation page. Once the user accepts, the order would then process. WooCommerce provides all of the filters needed to add this type of functionality.

    Kind Regards,

    Thread Starter threadi

    (@threadi)

    Would have no problem writing that. Do you know where I can intercept the WooCommerce checkout request (which hook)? At the moment the customer is taken directly to the thank you page. Do you have a tip for this? If not, I’ll look for it.

    Plugin Author Payment Plugins

    (@mrclayton)

    You can use one of several filters.

    wc_ppcp_process_payment_result https://plugins.trac.www.ads-software.com/browser/pymntpl-paypal-woocommerce/trunk/src/Payments/Gateways/AbstractGateway.php#L194

    woocommerce_checkout_order_processed

    Using wc_ppcp_process_payment_result will be the easiest because that’s only called when the PayPal plugin is processing the payment. You can short circuit the payment process and provide a redirect url to your address page.

    Simple Example:

    add_filter('wc_ppcp_process_payment_result', function($result, $order, $gateway){
    if($gateway->payment_handler->get_paypal_order_id_from_request()){
    $result = ['result' => 'success', 'redirect' => 'https://example.com'];
    }
    return $result;
    }, 10, 3);

    After the user confirms, you would then need to call the payment process again to ensure the payment is completed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change shipping address after PayPal Express Checkout’ is closed to new replies.