def authorise3d
      payment = Spree::Adyen::RedirectResponse.find_by(md: params[:MD]).payment
      payment.request_env = request.env
      payment_method = payment.payment_method
      @order = payment.order

      payment_method.authorize_3d_secure_payment(payment, adyen_3d_params)
      payment.capture! if payment_method.auto_capture

      if complete
        redirect_to_order
      else
        redirect_to checkout_state_path(@order.state)
      end

      rescue Spree::Core::GatewayError
        handle_failed_redirect
    end
def authorise3d
      payment = Spree::Adyen::RedirectResponse.find_by(md: params[:MD]).payment
      payment.request_env = request.env
      payment_method = payment.payment_method
      @order = payment.order

      payment_method.authorize_3d_secure_payment(payment, adyen_3d_params)
      payment.capture! if payment_method.auto_capture

      if complete
        redirect_to_order
      else
        redirect_to checkout_state_path(@order.state)
      end

      rescue Spree::Core::GatewayError
        handle_failed_redirect
    end
This is the entry point after returning from the 3DS page for credit cards
 that support it. MD is a unique payment session identifier returned
 by the card issuer.