Tuesday, July 5, 2022
HomeWordPress Developmentplugins - redirect fee gateway

plugins – redirect fee gateway


I would really like if redirect.php is working? Shall I place the redirect.php in pattern plugin folder?

content material of redirect.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content material-Sort" content material="textual content/html; charset=UTF-8" />
</head>
<physique>
        
    <type id="redirectForm" motion="https://gateway.mytmoney.mu/net/funds" methodology="put up">
        <enter kind="hidden" identify="appId" worth="<?php echo $_GET[ 'appID' ]; ?>"/>
        <enter kind="hidden" identify="merTradeNo" worth="<?php echo $_GET[ 'merTradeNo' ]; ?>"/>
        <enter kind="hidden" identify="payload" worth="<?php echo $_GET[ 'encryptedPayload' ]; ?>"/> 
        <enter kind="hidden" identify="paymentType" worth="<?php echo $_GET[ 'paymentType' ]; ?>"/>
        <enter kind="hidden" identify="signal" worth="<?php echo $_GET[ 'sign' ]; ?>"/>
        <p><enter kind="submit" worth="Pay By my.t cash"/></p>
        </type>

<type motion="https://transaportation.native/my-account" methodology="put up">
        <enter kind="hidden" identify="merTradeNo" worth=MT001/>
        <enter kind="hidden" identify="TradeNo" worth="123456"/>
        <enter kind="hidden" identify="tradeStatus" worth="S"/>
        <enter kind="hidden" identify="msg" worth="SUCCESS"/>
        <enter kind="hidden" identify="resultcode" worth="000"/>
        <enter kind="hidden" identify="signal" worth=""/>
        </type>
<script kind="textual content/javascript">
    doc.all.redirectForm.submit();
</script>   
</physique>
</html>

Content material of plugin:

public operate process_payment( $order_id ) {
....
//provoke fee
            $response = $moovpay->buy($appID,$merTradeNo,$encryptedPayload,$paymentType,$signal);
            $fh = fopen(plugin_dir_path(__FILE__).'redirect.php', 'w+');
            fwrite($fh, $response);
            fclose($fh);
            **$redirect_url = plugin_dir_url(__FILE__).'redirect.php';**
  
            return array(
            'outcome' => 'success',
            'redirect' => $redirect_url
            );

Thanks,

Roshan

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments