Zeshan Khan
Zeshan Khan

Reputation: 294

FirstData with wp-woocommerce

How can I use FirstData Latvia as a payment gateway in wp-woocommerce plugin? I am using WordPress and a plugin wp-woocommerce and i want to use the payment gateway FirstData Latvia. Thanks in advance

Upvotes: 0

Views: 551

Answers (1)

Manju
Manju

Reputation: 765

you have to take SSL licence from your web hoster for yor site

After installation if that will not work then try to add below code in your function.php of theme for particular page with ssl

add_action('wp_head', 'apply_ssl_to_specific_page');
add_action('admin_head', 'apply_ssl_to_specific_page');
add_action('login_head', 'apply_ssl_to_specific_page');
function apply_ssl_to_specific_page(){
        <?php
    if ( is_page('your-checkout-page-slug') ) {
        if($_SERVER['SERVER_PORT'] != '443')
            header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
    } else {
        if($_SERVER['SERVER_PORT'] == '443') 
            header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
    }

}

replace your-checkout-page-slug with your page slug. thank you

Upvotes: 1

Related Questions