i'm using paypal adaptive payment API.
When a user submit the buy button on my site he redirect to paypal page,
in the paypal page he see only the cost amount for the item, and the seller store name. no shiping details , no item details . just seller name + amount.
what i'm missing?
how can i add the shiping cost + the item details to the paypal page .
here is what i done so far:
$receiver[0] = new Receiver();
$receiver[0]->amount = $total_amount;
$receiver[0]->email = $seller_email;
$itemData[0] = new InvoiceItem();
$itemData[0]->name = "test_item";
$itemData[0]->identifier = "123";
$itemData[0]->price = "10.00";
$itemData[0]->itemCount = "1";
$itemData[0]->itemPrice = "10.00";
$invoiceData->totalTax = "0";
$invoiceData->totalShipping = "10";
$invoiceData->item = $itemData;
$senderOptions = new SenderOptions();
$senderOptions->addressOverride = "1";
$senderOptions->requireShippingAddressSelection = "1";
$receiverOptions = new ReceiverOptions();
$receiverOptions->customId = "customID";
$receiverOptions->receiver = $receiverInvoice;
$receiverOptions->invoiceData = $invoiceData;
$receiverOptions->SenderOptions = $senderOptions;
$receiverList = new ReceiverList($receiver);
$requestEnvelope = new RequestEnvelope("en_US");
$payRequest = new PayRequest();
$payRequest->requestEnvelope = $requestEnvelope;
$payRequest->receiverOptions = $receiverOptions;
$payRequest->receiverList = $receiverList;
$payRequest->actionType = "PAY";
$payRequest->cancelUrl = "http://pay.php?success=cancel";
$payRequest->returnUrl = "http://pay.php?success=true";
$payRequest->currencyCode = "USD";
$payRequest->ipnNotificationUrl = "http://replaceIpnUrl.com";
$adaptivePaymentsService = new AdaptivePaymentsService($sdkConfig);
$payResponse = $adaptivePaymentsService->Pay($payRequest);
$ack = strtoupper($payResponse->responseEnvelope->ack);
if ($ack == "SUCCESS") {
$payKey = $payResponse->payKey;
$payPalURL = PAYPAL_REDIRECT_URL. $payKey;
} else {
die();
}
header('Location:' . $payPalURL);
Related
I have written a web service for order creation as below
<?php
#ini_set('display_errors', 'on');
define('_PS_DEBUG_SQL_', true);
require_once('db.php');
require_once('PSWebServiceLibrary.php');
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$customerId = $_POST['customerid'];
$address = $_POST['address'];
$phoneno = $_POST['phoneno'];
$city = $_POST['city'];
$postcode = $_POST['postcode'];
$totalprice = $_POST['totalprice'];
$orders = $_POST['orders'];
$firstname = $_POST['firstname'] ;
$lastname = $_POST['lastname'] ;
$paymethod = "cod"; // cod or payu// cod or payu
$curdate=date('Y-m-d H:i:s');
if($paymethod == "payu") {
$orderModule = "citruspayu" ;
$orderPayment = "PayUmoney " ;
} else if($paymethod =="cod") {
$orderModule = "ps_cashondelivery" ;
$orderPayment = "Cash on delivery (cod)" ;
}
$curdate=date('Y-m-d H:i:s');
$orders = str_replace("\\", "",$orders);
$orders = json_decode($orders, true) ;
$ocnt=sizeof($orders);
//print_r($ocnt);
// need to check with product id and qunatity - ps_stock_available
// for ($i = 0 ; $i < $ocnt ; $i++) {
// $proid= $orders[$i]['product_id'];
// $quan=$orders[$i]['total_qty'];
// }
$result = array() ;
// print_r($result);
try
{
$sql=mysqli_query($con,"select * from `ps_customer` WHERE id_customer='".$customerId."'");
$cnt=mysqli_affected_rows($con);
if($cnt!=0) { //to place order
$row=mysqli_fetch_assoc($sql);
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = $webService->get(array('url' => PS_SHOP_PATH.'/api/addresses?ws_key='.PS_WS_AUTH_KEY.'&schema=synopsis'));
$resources = $xml->children()->children();
$resources->id_country = 110; //India
$resources->id_state = 348; //Tamil Nadu
$resources->id_customer = $customerId;
$resources->alias = "My address";
$resources->lastname = $lastname ; //$row['lastname'];// last name is required
$resources->firstname = $firstname;
$resources->address1 = $address;
$resources->postcode = $postcode;
$resources->city = $city;
$resources->phone_mobile = $phoneno;
$resources->active = 1;
$resources->date_add = date('Y-m-d H:i:s');
$resources->date_upd = date('Y-m-d H:i:s');
$sql = mysqli_query($con,"select * from ps_address where id_customer=$customerId and firstname='".$firstname."' and lastname='".$lastname."' and address1='".$address."' and city='".$city."' and postcode='".$postcode."' and (phone_mobile= $phoneno or phone=$phoneno)");
//$sqll= "select * from ps_address where id_customer=$customerId and firstname='".$firstname."' and lastname='".$lastname."' and address1='".$address."' and city='".$city."' and postcode='".$postcode."' and (phone_mobile= $phoneno or phone=$phoneno)";
// echo $sqll;
$cnt=mysqli_num_rows($sql);
// echo "addrs count....".($cnt);
if($cnt == 0) {
$opt = array('resource' => 'addresses?ws_key='.PS_WS_AUTH_KEY.'&schema=synopsis');
// echo "111";
$opt['postXml'] = $xml->asXML();// echo $opt['postXml'];
// echo "222";
$xml = $webService->add($opt);
// echo "333";
$addressid = $xml->address->id;
// echo "string".$addressid;
}
else {
$address=mysqli_fetch_assoc($sql) ;
$addressid = $address['id_address'] ;
//echo "address id---".$addressid ;
}
//echo "now";
//exit();
if($addressid) { // if addressid exists
// to insert cart details
$cxml = $webService->get(array('url' => PS_SHOP_PATH.'/api/carts?ws_key='.PS_WS_AUTH_KEY.'&schema=synopsis'));
$cresources = $cxml->children()->children();
$cresources->id_carrier = 4;
$cresources->id_shop_group = 1;
$cresources->id_shop = 1;
$cresources->delivery_option = 'a:1:{i:'.$addressid.';s:2:"4,";}';
$cresources->id_customer = $customerId;
$cresources->id_lang = 2;
$cresources->id_address_delivery =$addressid;
$cresources->id_address_invoice = $addressid;
$cresources->id_currency = 1;
$cresources->id_guest = 1;
$cresources->date_add = date('Y-m-d H:i:s');
$cresources->date_upd = date('Y-m-d H:i:s');
$opt = array('resource' => 'carts?ws_key='.PS_WS_AUTH_KEY.'&schema=synopsis');
$opt['postXml'] = $cxml->asXML();
$cxml = $webService->add($opt);
$cartid = $cxml->cart->id;
echo "cart id===".$cartid ;
if($cxml) {
/*insert cart product*/
$delqur = mysqli_query($con,"DELETE FROM ps_cart_product WHERE id_cart = $cartid;");
for ($i = 0 ; $i < $ocnt ; $i++) {
$proid= $orders[$i]['product_id'];
$quan=$orders[$i]['total_qty'];
$qur = mysqli_query($con,"INSERT INTO ps_cart_product (`id_cart`,`id_product`,`id_address_delivery`,`id_shop`,
`id_product_attribute`,`quantity`,`date_add`) VALUES('$cartid','$proid','$addressid','1','0','$quan','$curdate');");
}
/*insert cart product*/
/*to insert order details*/
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$orderxml = $webService->get(array('url' => PS_SHOP_PATH.'/api/orders?ws_key='.PS_WS_AUTH_KEY.'&schema=synopsis'));
$orderxml->order->id_address_delivery = $addressid;
$orderxml->order->id_address_invoice = $addressid;
$orderxml->order->id_cart = $cartid;
$orderxml->order->id_currency = 1;
$orderxml->order->id_lang = 2;
$orderxml->order->id_customer = $customerId;
$orderxml->order->id_carrier = 4; // Check your id_carrier
$orderxml->order->current_state = 3;
$orderxml->order->module = $orderModule ;
//'citruspayu' ; //'ps_cashondelivery';
$orderxml->order->valid = 0;
$orderxml->order->id_shop_group = 1;
$xml->order->id_shop = 1;
$orderxml->order->payment = $orderPayment ;
//"PayUmoney" ; //'Cash on delivery (COD)';
$orderxml->order->total_discounts = 0;
$orderxml->order->total_discounts_tax_incl =0;
$orderxml->order->total_discounts_tax_excl =0;
$orderxml->order->total_paid = $totalprice;
$orderxml->order->total_paid_tax_incl = $totalprice;
$orderxml->order->total_paid_tax_excl = $totalprice;
$orderxml->order->total_paid_real = $totalprice;
$orderxml->order->total_products = 2 ;
$orderxml->order->total_products_wt = 200 ;
$orderxml->order->total_shipping = 0;
$orderxml->order->total_shipping_tax_incl = 0;
$orderxml->order->total_shipping_tax_excl = 0;
$orderxml->order->conversion_rate = 1;
// $orderxml->order->from_device="app" ;
$orderxml->order->secure_key = md5(uniqid(rand(), true));;
$opt = array('resource' => 'orders?sendemail=1');
$orderxml = $orderxml->asXML();
$opt['postXml'] = $orderxml ; //echo $opt['postXml'];
$orderxml = $webService->add($opt);
$orderid=$orderxml->order->id;
if($orderxml) {
$findSecLastInvoice=mysqli_query($con,"SELECT * FROM `ps_order_invoice` ORDER BY `delivery_number` DESC LIMIT 1");
$icnt=mysqli_affected_rows($con);
if($icnt!=0) {
$inrow=mysqli_fetch_assoc($findSecLastInvoice);
$dnumber =$inrow['delivery_number'] + 1;
} else {
$dnumber =1;
}
$findOrderid=mysqli_query($con,"SELECT * FROM `ps_orders` WHERE id_cart='$cartid'");
$orderrow=mysqli_fetch_assoc($findOrderid);
$update_orderinvoice = mysqli_query($con, "UPDATE ps_order_invoice SET delivery_number='$dnumber',delivery_date='$curdate' WHERE id_order='".$orderrow['id_order']."'") ;
if($update_orderinvoice) {
$update_order = mysqli_query($con, "UPDATE ps_orders SET delivery_number='$dnumber',delivery_date='$curdate' WHERE id_order='".$orderrow['id_order']."'") ;
$update_orderhistory = mysqli_query($con, "UPDATE ps_order_history WHERE id_order='".$orderrow['id_order']."'") ;
$result['status']= "Success";
$result['orderid'] = strval($orderid) ;
}
} else {
$result['status']= "Error";
} //$oxml
} //$cxml
// to insert cart details
} //$address id
}
else { //not exists
$result['status']="Account Not Found";
}
// header('Content-type: application/json');
echo json_encode($result);
mysqli_close($con);
}
catch (PrestaShopWebserviceException $e)
{
// Here we are dealing with errors
$trace = $e->getTrace();
if ($trace[0]['args'][0] == 404) echo 'Bad ID';
else if ($trace[0]['args'][0] == 401) echo 'Bad auth key';
else echo 'Other error<br />'.$e->getMessage();
}
}//post
else {
echo "No Post Parameters" ;
}
//}
?>
While running in postman I get a success message. but when I see app log am getting an error as HTTP XML response is not parsable and LibXMLError::__set_state error...somebody pls help. I have also trimmed it but no use.1
I'm using PSWebServiceLibrary.php for Prestashop and in the add function, this is the code which sends the XML request for parsing.
I have seen the other examples here on StackOverflow but neither are working for me, my code creates an address line in NetSuite but the addr1, city, state and zip are empty, the default billing and shipping do show false or if I set it to true it shows true so that part is updating.. The response doesn't show any errors. Any ideas?
Here is my code:
$customer = new Customer();
$customer->internalId = 16;
$customer->firstName = 'Joe';
$customer->middleName = 'A';
$customer->lastName = 'Smith';
$customer->email = 'joe#email.com';
$address = new CustomerAddressBook();
$address->defaultShipping = false;
$address->defaultBilling = false;
$address->isResidential = true;
$address->addr1 = '123 Street';
$address->city = 'New York';
$address->zip = '12345';
$address->state = 'NY';
$addressBook = new CustomerAddressbookList();
$addressBook->addressbook = array($address);
$addressBook->replaceAll = false;
// add address to cutomer
$customer->addressbookList = $addressBook;
$request = new UpdateRequest();
$request->record = $customer;
$netsuiteService = new NetSuiteService();
$response = $netsuiteService->update($request);
$address = new Address();
$address->addr1 = '123 Street';
$address->city = 'New York';
$address->zip = '12345';
$address->state = 'NY';
$address_book = new CustomerAddressBook();
$address_book->defaultShipping = false;
$address_book->defaultBilling = false;
$address_book->isResidential = true;
$address_book->addressbookAddress = $address;
$address_book_list = new CustomerAddressbookList();
$address_book_list->addressbook = $address_book;
$address_book_list->replaceAll = false;
$customer = new Customer();
$customer->internalId = 16;
$customer->firstName = 'Joe';
$customer->middleName = 'A';
$customer->lastName = 'Smith';
$customer->email = 'joe#email.com';
$customer->addressbookList = $address_book_list;
$request = new UpdateRequest();
$request->record = $customer;
$netsuiteService = new NetSuiteService();
$response = $netsuiteService->update($request);
if (!$response->writeResponse->status->isSuccess) {
echo "UPDATE ERROR";
} else {
echo "UPDATE SUCCESS, id " . $response->writeResponse->baseRef->internalId;
}
I am looking to add a new Address to an existing customers AddressBook. I am able to add an address for a new customer, but when adding/updating an address to an existing customer, the InternalID of the customform to update the address is a negative number which netsuite is rejecting. Is my code off, or is there a different customform I need to update.
$shipService = new NetSuiteService();
$gr = new GetRequest();
$gr->baseRef = new RecordRef();
$gr->baseRef->internalId = $internalId;
$gr->baseRef->type = "customer";
$getResponse = $shipService->get($gr);
//look in response for customer record
$customer = $getResponse->readResponse->record;
//add new address
$address = new CustomerAddressBook();
$address->defaultShipping = true;
$address->defaultBilling = true;
$address->attention = $customer_first . ' ' . $customer_last;
$address->addr1 = $customer_addr1;
$address->addr2 = $customer_addr2;
$address->city = $customer_city;
$address->zip = $customer_zip;
$address->state = $customer_state;
//add new Address book list
$addressBook = new CustomerAddressbookList();
$addressBook->addressbook = array($address);
$addressBook->replaceAll = false;
//add address book to customer record
$customer->addressbookList = $addressBook;
$shipService2 = new NetSuiteService();
$addrRequest = new UpdateRequest();
$addrRequest->record = $customer;
$addrResponse = $shipService2->update($addrRequest);
this returns
"Invalid customform reference key -10002."
The solution is to actually create a New Customer(); instead of doing a baseref to an existing customer. It is still an update request, but you assign the update to the internalId of an existing customer. So, the address update code looks like this:
$shipService = new NetSuiteService();
$address = new CustomerAddressBook();
$address->defaultShipping = true;
$address->defaultBilling = true;
$address->attention = $customer_first.' '.$customer_last;
$address->addr1 = $customer_addr1;
$address->addr2 = $customer_addr2;
$address->city = $customer_city;
$address->zip = $customer_zip;
$address->state = $customer_state;
$addressBook = new CustomerAddressbookList();
$addressBook->addressbook = array($address);
$addressBook->replaceAll = false;
$customer = new Customer();
$customer->addressbookList = $addressBook;
$customer->internalId = $internalId;
$customer->customForm = new RecordRef();
$customer->customForm->internalId = 24;
$customer->addressbookList = $addressBook;
$shipService2 = new NetSuiteService();
$addrRequest = new UpdateRequest();
$addrRequest->record = $customer;
$addrResponse = $shipService2->update($addrRequest);
This seems very odd to me. Try setting the customform to the internal ID of a Customer form that is active in NetSuite (-2) is the standard Customer form, but make sure it is not inactive before using it.
Other than that, I'd say you have to look at other scripts or workflows that could interfere with your script, such as one that would process some beforeSubit functionality.
Hai I am trying to integrate Google Adword API .. I am not having any devloper token for under MCC (My client center) account .
I am using this code ... But its not working
If you have any answer for this problem then please help me ... thanks in advance
<?php
require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
$username = "abc#mail.com";
$password = "abc";
$currencyCode = "USD";
$developerToken = "$username++$currencyCode";
$user = new AdWordsUser(null, $username, $password, $developerToken);
$user->SetDefaultServer("https://adwords-sandbox.google.com/");
$user->LogAll();
$user->SetClientId(null);
try {
$campaignService = $user->GetService("CampaignService", 'v201306');
$page = $campaignService->get(new Selector());
} catch (Exception $e) {
}
$managedCustomerService = $user->GetService('ManagedCustomerService', 'v201306');
$selector = new Selector();
$selector->fields = array('Login', 'CustomerId', 'Name');
$page = $managedCustomerService->get($selector);
$accounts = array();
foreach ($page->entries as $account) {
if ($account->customerId > 0) {
$accounts[] = $account;
}
}
foreach ($accounts as $account) {
print "Customer ID: {$account->customerId}\n";
}
$customerId = $accounts[0]->customerId;
$user->SetClientId($customerId);
$budgetService = $user->GetService('BudgetService', 'v201306');
$budget = new Budget();
$budget->name = 'Test Budget #' . time();
$budget->period = 'DAILY';
$budget->amount = new Money((float) 10000000);
$budget->deliveryMethod = 'STANDARD';
$operations = array();
$operation = new BudgetOperation();
$operation->operand = $budget;
$operation->operator = 'ADD';
$operations[] = $operation;
$result = $budgetService->mutate($operations);
$budget = $result->value[0];
$campaignService = $user->GetService("CampaignService", 'v201306');
$campaign = new Campaign();
$campaign->name = "Test Sandbox Account #" + time();
$campaign->status = "ACTIVE";
$campaign->biddingStrategy = new ManualCPC();
$campaign->budget = new Budget();
$campaign->budget->budgetId = $budget->budgetId;
$networkSetting = new NetworkSetting();
$networkSetting->targetGoogleSearch = TRUE;
$campaign->networkSetting = $networkSetting;
$campaign->settings = array(new KeywordMatchSetting(false));
$operation = new CampaignOperation();
$operation->operand = $campaign;
$operation->operator = 'ADD';
$operations = array($operation);
$result = $campaignService->mutate($operations);
print_r($result);
?>
I am getting this error ::
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords-sandbox.google.com//api/adwords/mcm/v201306/ManagedCustomerService?wsdl' : failed to load external entity "https://adwords-sandbox.google.com//api/adwords/mcm/v201306/ManagedCustomerService?wsdl" in /home/profiles/public_html/testing/seoteam/q/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php:169 Stack trace: #0 /home/profiles/public_html/testing/seoteam/q/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php(169): SoapClient->SoapClient('https://adwords...', Array) #1 /home/profiles/public_html/testing/seoteam/q/src/Google/Api/Ads/AdWords/Lib/AdWordsSoapClient.php(53): AdsSoapClient->__construct('https://adwords...', Array, Object(AdWordsUser), 'ManagedCustomer...', 'https://adwords...') #2 /home/profiles/public_html/testing/seoteam/q/src/Google/Api/Ads/AdWords/v201306/ManagedCustomerService.php(3660): AdWordsSoapClient->__construct('https://adwords...', Array, Object(AdWordsUser), 'ManagedCustomer...', 'https://adwor in /home/profiles/public_html/testing/seoteam/q/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 169
The Adwords API sandbox functionality is deprecated. You can use a test account while you wait for your token to be approved: Test accounts documentation
If you still keep getting this error even with Test accounts, check my answer at https://stackoverflow.com/a/41622876/674965
I am testing Temando API and trying to create a Booking. I have followed the instructions given by their manual Temando API R1_11 Developers Guide.
My problem is that when I create the call makeBookingByRequest with the following required information:
Anythings, Anywhere, Anytime, General, Origin, Destination, Quote, Payment, Instructions, Comments, Promotion Code.
It returns an error 500 : Internal Server Error. If it's something got to do with the permission, I have already fixed that.
By the way here's the rest of my code:
ini_set("soap.wsdl_cache_enabled", "1");
$client = new SoapClient("https://training-api.temando.com/schema/XXXX/server.wsdl", array('soap_version' => SOAP_1_2));
$username = "xxxxxxxxxx";
$password = "xxxxxxxxxx";
$headerSecurityStr = "<Security><UsernameToken><Username>".$username."</Username><Password>".htmlentities($password)."</Password></UsernameToken></Security>";
$headerSecurityVar = new SoapVar($headerSecurityStr, XSD_ANYXML);
$soapHeader = new SoapHeader('wsse:http://schemas.xmlsoap.org/ws/2002/04/secext', 'soapenv:Header', $headerSecurityVar);
$client->__setSoapHeaders(array($soapHeader));
$destination = array();
$destination["destinationCountry"] = "AU";
$destination["destinationCode"] = "2000";
$destination["destinationSuburb"] = "Sydney";
$destination["destinationIs"] = "Residence";
$destination["destinationResPostalBox"] = "N";
$destination["destinationResUnattended"] = "N";
$destination["destinationResInside"] = "N";
$destination["destinationResLimitedAccess"] = "N";
$destination["destinationResHeavyLift"] = "N";
$origin = array();
$origin["originDescription"] = "ABC Suppliers";
$origin["originBusUnattended"] = "N";
$origin["originBusInside"] = "N";
$origin["originBusHeavyLift"] = "N";
$origin["originBusTailgateLifter"] = "N";
$origin["originBusContainerSwingLifter"] = "N";
$quote = array();
$quote["totalPrice"] = "110.00";
$quote["basePrice"] = "100.00";
$quote["tax"] = "10.00";
$quote["currency"] = "AUD";
$quote["deliveryMethod"] = "Off-peak";
$quote["etaFrom"] = "2";
$quote["etaTo"] = "3";
$quote["guaranteedEta"] = "Y";
$payment = array();
$payment["paymentType"] = "Credit Card";
$payment["cardType"] = "Mastercard";
$payment["cardExpiryDate"] = "05-2010";
$payment["cardNumber"] = "5163190000000000";
$payment["cardName"] = "JANE DOE";
$comments = "No Comment";
$reference = "ABC200000";
$makeBookingByRequest = array();
$makeBookingByRequest["anything"] = $anything1;
$makeBookingByRequest["anytime"] = $anytime;
$makeBookingByRequest["anywhere"] = $anywhere;
$makeBookingByRequest["general"] = $general;
$makeBookingByRequest["origin"] = $origin;
$makeBookingByRequest["destination"] = $destination;
$makeBookingByRequest["quote"] = $quote;
$makeBookingByRequest["payment"] = $payment;
$makeBookingByRequest["instructions"] = $instructions;
$makeBookingByRequest["comments"] = $comments;
$makeBookingByRequest["reference"] = $reference;
$anythings = array();
$anything1 = array();
$anything1["class"] = "Freight";
$anything1["mode"] = "Less than load";
$anything1["packaging"] = "Carton";
$anything1["qualifierFreightGeneralFragile"] = "N";
$anything1["distanceMeasurementType"] = "Centimetres";
$anything1["weightMeasurementType"] = "Kilograms";
/** get the data below from POST DATA **/
$anything1["length"] = "30";
$anything1["width"] = "10";
$anything1["height"] = "10";
$anything1["weight"] = "10";
$anything1["quantity"] = "1";
$anything1["description"] = "Contains bottle lids and liquors.";
/*****************/
array_push($anythings, $anything1);
$anywhere = array();
$anywhere["itemNature"] = "Domestic";
$anywhere["itemMethod"] = "Door to Door";
$anywhere["originCountry"] = "AU";
$anywhere["originCode"] = "4000";
$anywhere["originSuburb"] = "Brisbane";
$anywhere["originIs"] = "Business";
$anywhere["originBusUnattended"] = "N";
$anywhere["originBusDock"] = "Y";
$anywhere["originBusForklift"] = "N";
$anywhere["originBusLoadingFacilities"] = "N";
$anywhere["originBusInside"] = "N";
$anywhere["originBusLimitedAccess"] = "N";
$anywhere["originBusHeavyLift"] = "N";
$anywhere["originBusTailgateLifter"] = "N";
$anywhere["originBusContainerSwingLifter"] = "N";
$anywhere["destinationCountry"] = "AU";
$anywhere["destinationCode"] = "2000";
$anywhere["destinationSuburb"] = "Sydney";
$anywhere["destinationIs"] = "Residence";
$anywhere["destinationResPostalBox"] = "N";
$anywhere["destinationResUnattended"] = "N";
$anywhere["destinationResInside"] = "N";
$anywhere["destinationResLimitedAccess"] = "N";
$anywhere["destinationResHeavyLift"] = "N";
$anytime = array();
$anytime["readyDate"] = "2012-06-01";
$anytime["readyTime"] = "PM";
$general = array();
$general["goodsValue"] = "2000.00";
call method:
try{
$makeBookingByRequestResponse = $client->makeBookingByRequest($makeBookingByRequest);
p($makeBookingByRequestResponse);
}catch (SoapFault $exception){
p($exception);
// Nothing is done with the exception yet. Will be processed later in the display code.
}
function p($arr){
echo '<pre>';
print_r($arr);
echo '</pre>';
}
Is there anyone who has experience in using Temando API? Any help would be appreciated.
Try to create your SOAP request using soapUI. It's a free software very useful to deal with SOAP web services. When it works, you can focus on build this request using PHP.