php - BigCommerce API - Can't create a new customer -


checked out similar questions on stackoverflow but, being newbie bc, still having real trouble one. trying create new customer using bigcommerce api (php).

i've been able connect bigcommerce store using api (php) , data, example, list of customers. code (just test moment) used follows:

require_once "bigcommerce-api/bigcommerce.php";  use bigcommerce\api\client bigcommerce;  bigcommerce::configure(array(     'store_url' => 'https://store-xxxxxxxx.mybigcommerce.com/', 'username'  => 'admin',     'api_key'   => 'xxxxxxxxxxxxxxxxxxxx' ));  bigcommerce::setcipher('rc4-sha'); bigcommerce::verifypeer(false);  $customers = bigcommerce::getcustomers();  foreach($customers $customer) {     echo $customer->first_name; echo $customer->last_name; echo "<br/>"; } 

my question is, how write php code create new customer in bigcommerce store?

thanks,

mekong

it's ok guys, i've got sorted. rough, test code works (hooray!):

$first_name = "willy"; $last_name = "wonka"; $email = "willy@wonkaville.com"; $company = "wonka pty ltd"; $phone = "03 9699 1234"; $store_credit = "0"; $customer_group_id = "2"; $authentication = "harry1";  $createfields = array('first_name'=>$first_name,'last_name'=>$last_name, 'email'=>$email, 'company'=>$company,'phone'=>$phone, 'store_credit'=>$store_credit,'customer_group_id'=>$customer_group_id, '_authentication'=>$authentication);  $customers = bigcommerce::createcustomer($createfields); 

Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -