PAV-I PHP SOAP

From CDYNE Wiki
Revision as of 15:21, 24 January 2019 by Gmurdock (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PAV-I will be discontinued in March 2013. We sincerely appreciate your support and regret any inconvenience this may cause.

This is a simple PHP SOAP code example that returns a verified international address.

You must enter a vaild License Key for this code to work properly. (Trial keys are fully functional)

 1 <?php
 2 
 3 $licensekey = 'your lk here';
 4 
 5 $client = new soapClient("http://pav3.cdyne.com/i/PavInternationalService.svc?wsdl");
 6 
 7 $AddressFields = Array(
 8 	'KeyValue'=>Array(
 9 		'Key'=>'ADDR',
10 		'Value' => 'Rose House, 51-59 Circular Road, Isle of Man, IM1 1AZ, United Kingdom'
11 	)
12 );
13 
14 $ReturnFields = Array("RESCODE","ADDR","OUTPUTSTATUS","MATCHLVL");
15 
16 $request = new pavireq($AddressFields,$ReturnFields,$licensekey, 0);
17 
18 
19 $result = $client->VerifyAddressInternational($request);
20 print_r($result);
21 
22 class pavireq{
23 	public $Request;
24 	function pavireq($addressfields,$returnfields,$licensekey,$returnnativeoutput)
25 	{
26 		$this->Request = array();
27 		$this->Request['AddressFields'] = $addressfields;
28 		$this->Request['ReturnFields'] = $returnfields;
29 		$this->Request['LicenseKey'] = $licensekey;
30 		$this->Request['ReturnNativeOutput'] = $returnnativeoutput;
31 	}
32 }
33 
34 ?>