I m getting response. Please guide me

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pay="http://paymentgateway.mcommerce/">

Welcome to the forums developersharad.

Is there a specific question you have to ask about this code.
It’s not clear exactly what the problem is.

ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient('',array('trace' => 1 )); 
$auth = array(
  "userid" => "**user-id**",
  "password" => "**password**",
$header = new SoapHeader($ns, 'pay', $auth);

$params = array(
  "MCODE" => 0001000269,
  "mcomPgTransID" => 2903173001857,
  "transRefNo" => 290320171490774815,
  "amt" => 1,
  "narration" => "refund",
  "reversalType" => "F",

$response = $client->__soapCall("refundPaymentTransaction", $params,NULL, $header);
//Create Soap Header.
//echo $client->__getLastRequest();
//echo $client->__getLastRequestHeaders();



Please see above code i m getting below error. please fix it.

object(stdClass)#3 (1) { ["Response"]=> object(stdClass)#4 (2) { ["statusCode"]=> string(3) "101" ["reason"]=> string(21) "Authentication failed" } }

so, if i understand it right, you did nothing on your own and want us to do your work?

1 Like

I am not able to succesfully connect with above wsdl url. I’ve tried above codes but none of them worked.

Because you are getting “Authentication failed”, I think that’s what you should look at fixing first.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.