Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.[/color]
Hi all,
I am calling a asp.net c# web service using php5 soap client , the first argument of the calling function is an array and the second object is string my code snippest is belowCode: Select all
if ($this->IsValid) // check if input validation is successful
{
$amount = TPropertyValue::ensureString($this->Amount->Text);
$cardtype = $this->CardType->SelectedValue;
$cardcard_number = TPropertyValue::ensureString($this->CardNumber->Text);
$securityCode = TPropertyValue::ensureString($this->SecurityCode->Text);
$ExpMonth = $this->Month->SelectedValue;
$ExpYear = $this->Year->SelectedValue;
$fname = TPropertyValue::ensureString($this->FirstName->Text);
$lname = TPropertyValue::ensureString($this->LastName->Text);
$address1 = TPropertyValue::ensureString($this->Address1->Text);
$address2 = TPropertyValue::ensureString($this->Address2->Text);
$city = TPropertyValue::ensureString($this->City->Text);
$state = TPropertyValue::ensureString($this->State->Text);
$zip = TPropertyValue::ensureString($this->Zip->Text);
/*$Data = array('BuyerAddress1' => $address1,'BuyerAddress2' => $address2,'BuyerCity' => $city , 'Country' => 'US','BuyerZipCode' => $zip,'BuyerState' => $state,'BuyerFirstName' => $fname, 'BuyerLastName' => $lname,'CreditCardNumber' => $cardcard_number,'CreditCardType' => $cardtype , 'CVV2' => $securityCode,'ExpMonth' => '02' ,'ExpYear' => '2018','Paymentcurrency'=>'USD','PaymentAmount' => $amount,'PaymentActionType' => 'Sale');*/
$param->BuyerAddress1 = $address1;
$param->BuyerAddress2 = $address2;
$param->BuyerCity = $city;
$param->Country = "US";
$param->BuyerZipCode = $zip;
$param->BuyerState = $state;
$param->BuyerFirstName = $fname;
$param->BuyerLastName = $lname;
$param->CreditCardNumber = $cardcard_number;
$param->CreditCardType = $cardtype;
$param->CVV2 = $securityCode;
$param->ExpMonth = "02";
$param->ExpYear = "2018";
$param->Paymentcurrency = "USD";
$param->PaymentAmount = $amount;
$param->BuyerIPAddress = "127.0.0.1";
$param->PaymentActionType = "Sale";
//var_dump($objPaymentReq);*/
//$obj->objPaymentReq = $Data;
//print '<pre>';print_r($objPaymentReq);print '</pre>';exit;
try
{
$client = new SoapClient('http://203.197.202.163/SprasiaPaypalService/PaymentService.asmx?wsdl');
$PaymentGateway = "PayPal";
$result = $client->DoPayment(array('PaymentRequest' => $param) , $PaymentGateway);
if($client->fault)
{
print "There is some fault";
//echo json_encode($result);
//print "This is Transaction Key".$result->TransactionID;
}
else{
print_r($result);
}
}
catch(Exception $e)
{
print $e->getMessage();
}
}But when i try to print the "$result" using print_r is give only stdClass Object ( )
Please sugget for the same what i am doing wrong.
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.[/color]