• Resolved adistler

    (@adistler)


    Hi community,
    I’m using WooCommerce 3.5.0 with the plugin WooCommerce “Germanized” 2.2.3 on our page.
    We’ve enabled direct SEPA debit payment in the european region. I’m aware that some encryption with a passphrase happens because of the new data protection laws (GDPR) in the germanized plugin.

    After a customer has placed his order with SEPA details (IBAN + BIC etc.) I want to export these payment details to office file (e.g. excel/csv/…). Currently I’m using the additional plugin “Advanced Order Export for WooCommerce” v. 2.0.0

    When doing so, Im only able to see the encrypted IBAN + BIC values in the exported office file from this order column.
    Question: Is it possible to export the plaintext IBAN & bic number from the placed orders into a office file? How would be the best way to do so?

    Thank you very much in advance!

    Andy

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    You can try following code , I didn’t test it!
    thanks, Alex

    add_filter('woe_get_order_value_direct_debit_iban', "woe_German_decrypt",10,3);
    add_filter('woe_get_order_value_direct_debit_bic', "woe_German_decrypt",10,3);
    function woe_German_decrypt($value,$order,$field){
      include_once WC_GERMANIZED_ABSPATH . 'includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php';
      $instance = new WC_GZD_Gateway_Direct_Debit();
      return $instance->maybe_decrypt( $value );
    }
    Thread Starter adistler

    (@adistler)

    Thank you algol!
    Do you have any suggestion where to best place this code? At the end of /view/tab/export.php ?

    Plugin Author algol.plus

    (@algolplus)

    open section “Misc Settings”, mark checkbox “Custom code” and put code into the textarea

    Thread Starter adistler

    (@adistler)

    Thanks.
    I’ve tried it – din’t work unfortunately.

    Also modified it a bit to the following, but not success:

    add_filter('woe_get_order_value_direct_debit_iban', "woe_German_decrypt",10,3);
    add_filter('woe_get_order_value_direct_debit_bic', "woe_German_decrypt",10,3);
    function woe_German_decrypt($value,$order,$field){
      include_once WC_GERMANIZED_ABSPATH . 'includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php';
      $instance = new WC_GZD_Gateway_Direct_Debit();
      return $instance->maybe_decrypt( wc_gzd_get_crud_data( $order, $value ));
    }
    Plugin Author algol.plus

    (@algolplus)

    Please, put something like var_dump($value);die(“debug”); inside function woe_German_decrypt.

    and press Preview. Will you see encrypted value?

    Thread Starter adistler

    (@adistler)

    Still getting strings like below and longer for the iban & bic values.

    "def50200473f769aae77ae2ba5e585ca74fca1e708d792043758b1dc1460f50ac7f00042faf829745b3555c9af1c489c2a4cf48a574f98e92e060396ba8c6665beab974dd023ce9177429f4d"

    Plugin Author algol.plus

    (@algolplus)

    hi Andy

    Could you contact me via helpdesk and attach settings to ticket (use tab “Tools”)
    ?
    thanks, Alex

    Plugin Author algol.plus

    (@algolplus)

    These fields have extra “_” in first position. So final code is

    add_filter('woe_get_order_value__direct_debit_iban', "woe_German_decrypt",10,3);
    add_filter('woe_get_order_value__direct_debit_bic', "woe_German_decrypt",10,3);
    function woe_German_decrypt($value,$order,$field){
      include_once WC_GERMANIZED_ABSPATH . 'includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php';
      $instance = new WC_GZD_Gateway_Direct_Debit();
      return $instance->maybe_decrypt( $value );
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to encrypt IBAN and BIC on order export?’ is closed to new replies.