-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcustomerupdate.php
More file actions
35 lines (30 loc) · 951 Bytes
/
customerupdate.php
File metadata and controls
35 lines (30 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @author kem parson
* @copyright 2016
*/
$firstname=$_REQUEST['firstname'];
$lastname=$_REQUEST['lastname'];
$customer=$_REQUEST['custid'];
$telephone=$_REQUEST['mobile'];
$lisence=$_REQUEST['lis'];
$email=$_REQUEST['email'];
require_once ($_SERVER['DOCUMENT_ROOT'] .'/app/Mage.php');
require_once ('config.php');
Mage::app();
Mage::app()->getTranslator()->init('frontend');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$proxy = new SoapClient(Mage::getBaseUrl().'/api/v2_soap/?wsdl');
$sessionId = $proxy->login(APIUSER, APIKEY);
try
{
$result =$proxy->customerCustomerUpdate($sessionId, $customer, array('email' => $email, 'firstname' => $firstname, 'lastname' => $lastname, 'le_valid_license'=>$lisence , 'le_phone_number' => $telephone));
$ret['sucess']=$result ;
}
catch (Exception $e) {
$message = $e->getMessage();
$errors='true';
$ret['error']=$message ;
}
echo json_encode($ret);
?>