نمایش نتایج: از شماره 1 تا 7 , از مجموع 7

موضوع: مشکل با ماژوال درگاه ملت

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #6
    عضو انجمن rezaonline.net آواتار ها
    تاریخ عضویت
    Apr 2012
    محل سکونت
    Sanandaj | Tehran
    نوشته ها
    939
    تشکر تشکر کرده 
    1,556
    تشکر تشکر شده 
    2,338
    تشکر شده در
    1,230 پست

    پیش فرض پاسخ : مشکل با ماژوال درگاه ملت

    خسته نباشید

    فایل callback/Mellat.php رو باز کنید و دستورات زیر رو جایگزین کنید کامل .
    کد:
    <?
     ////********************************************************////
     ////       Bank Mellat Gateways V 1.0 Module 4 WHMCS        ////
     ////********************************************************////
    
    
    include("../../../dbconnect.php");
    include("../../../includes/functions.php");
    include("../../../includes/gatewayfunctions.php");
    include("../../../includes/invoicefunctions.php");
    include("../Mellat/config.php");
    require_once("../Mellat/lib/nusoap.php");
    
            //curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
            //$page = curl_exec ($ch);
    
            $client = new nusoap_client('https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl');
            $namespace='http://interfaces.core.sw.bps.com/';
    
                     $resId = $_POST['ResCode'];
                     $orderId = $_POST['SaleOrderId'];
                     $verifySaleOrderId = $_POST['SaleOrderId'];
                     $verifySaleReferenceId = $_POST['SaleReferenceId'];
                     $invoiceid = $_REQUEST['iid'] ;
    
    		// Check for an error
    		$err = $client->getError();
    		if ($err) {
    			echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
    			die();
    		}
    
    $parameters = array(
    			'terminalId' => $terminalId,
    			'userName' => $userName,
    			'userPassword' => $userPassword,
    			'orderId' => $orderId,
    			'saleOrderId' => $verifySaleOrderId,
    			'saleReferenceId' => $verifySaleReferenceId);
    
    		// Call the SOAP method
    		$result = $client->call('bpVerifyRequest', $parameters, $namespace);
    		$err = $client->getError();
            $VerifyAnswer = $result;
    
    if( !$err and isset($result) and $result==0 and $VerifyAnswer == '0'){
    $parameters = array(
    			'terminalId' => $terminalId,
    			'userName' => $userName,
    			'userPassword' => $userPassword,
    			'orderId' => $orderId,
    			'saleOrderId' => $verifySaleOrderId,
    			'saleReferenceId' => $verifySaleReferenceId);
    
    		// Call the SOAP method
    		$result2 = $client->call('bpSettleRequest', $parameters, $namespace);
    		$err = $client->getError();
            $SetlleAnswer = $result2;
            if (!$err and isset($result2) and $result2==0 and $SetlleAnswer == '0'){
    
            $Pay_Status = 'OK'; }
    
    
    }
    
    if ($VerifyAnswer <> '0' AND $VerifyAnswer != '' ){
                  $parameters = array(
    			'terminalId' => $terminalId,
    			'userName' => $userName,
    			'userPassword' => $userPassword,
    			'orderId' => $orderId,
    			'saleOrderId' => $verifySaleOrderId,
    			'saleReferenceId' => $verifySaleReferenceId);
    
             $result = $client->call('bpInquiryRequest', $parameters, $namespace);
             $InquiryAnswer = $result ;
            if ($InquiryAnswer == '0'){
    
              $parameters = array(
    			'terminalId' => $terminalId,
    			'userName' => $userName,
    			'userPassword' => $userPassword,
    			'orderId' => $orderId,
    			'saleOrderId' => $verifySaleOrderId,
    			'saleReferenceId' => $verifySaleReferenceId);
    
    		// Call the SOAP method
    		$result = $client->call('bpSettleRequest', $parameters, $namespace);
            $SetlleAnswer = $result;
    }else{
       $parameters = array(
    			'terminalId' => $terminalId,
    			'userName' => $userName,
    			'userPassword' => $userPassword,
    			'orderId' => $orderId,
    			'saleOrderId' => $verifySaleOrderId,
    			'saleReferenceId' => $verifySaleReferenceId);
    
    		// Call the SOAP method
    		$result = $client->call('bpReversalRequest', $parameters, $namespace);
    }
    }
    
    
    $action=$SystemURL."viewinvoice.php?id="."$invoiceid" ;
    $gatewaymodule = "Mellat";
    $GATEWAY = getGatewayVariables($gatewaymodule);
    if (!$GATEWAY["type"]) die("Module Not Activated");
    
    if ($Pay_Status == 'OK' ){
    	  # Save to Gateway Log: name, data array, status
          addInvoicePayment($invoiceid,$verifySaleReferenceId,$amount,$fee,$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, fees, modulename
          logTransaction($GATEWAY["name"],$_POST,"Successful");
          echo " <script>window.location ='".$action."'</script>";
          }else{
            # Unsuccessful
        logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); # Save to Gateway Log: name, data array, status
    
        echo " <script>window.location ='".$action."'</script>";
    
    }

  2. تعداد تشکر ها از rezaonline.net به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •