2.- ...
3.- ...
.
callUrl($url, 'post', $postBody, true);
if ($api->hasErrors()){
renderAdminError($api->getErrorMessage());
return;
}
?>
callUrl($url, 'post', $postBody, true);
if ($api->hasErrors()){
renderAdminError($api->getErrorMessage());
return;
}
update_option('bachbill_adminAreaId', $id.'_admin_area');
update_option('bachbill_adminUserId', $id);
update_option('bachbill_adminUserPassword', $password);
update_option('bachbill_endUserAreaId', $id.'_end_user_area');
update_option('bachbill_priceplanId', $id.'_priceplan');
update_option('bachbill_account_setup', 'pendingCode');
?>
callUrl($url, 'post', $postBody, true);
if ($api->hasErrors()){
renderAdminError($api->getErrorMessage());
return;
}
$adminAreaId=get_option('bachbill_adminAreaId');
$adminUserId=get_option('bachbill_adminUserId');
$adminUserPassword=get_option('bachbill_adminUserPassword');
$endUserAreaId=get_option('bachbill_endUserAreaId');
$priceplanId=get_option('bachbill_priceplanId');
$api=getBachbillApi();
$api->setAdminAreaId($adminAreaId);
$api->setAdminUserId($adminUserId);
$api->setAdminUserPassword($adminUserPassword);
$api->setParam('action', 'set');
$api->setParam('paypalEnvironment', 'sandbox');
$api->setParam('paypalApiUsername_sandbox', 'sdk-three_api1.sdk.com');
$api->setParam('paypalApiPassword_sandbox', 'QFZCWN5HZM8VBG7Q');
$api->setParam('paypalApiSignature_sandbox', 'A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI');
$api->setParam('paypalApiUsername_live', '');
$api->setParam('paypalApiPassword_live', '');
$api->setParam('paypalApiSignature_live', '');
$api->setParam('currency', 'EUR');
$api->setParam('taxPercentage', '0');
update_option('bachbill_taxPercentage', '0');
$res=$api->callOnIncomingUrlAction($priceplanId, '/pushConfig');
if ($api->hasErrors()){
?>
getErrorMessage();?>
$value) {
$socialNetworks[$key]=isset($_POST[$key]) ? true : false;
}
$nPayments=0;
foreach ($paymentMethods as $key=>$value) {
$paymentMethods[$key]=isset($_POST[$key]) ? true : false;
if ($paymentMethods[$key]){
$nPayments++;
}
}
update_option('bachbill_social_networks', $socialNetworks);
update_option('bachbill_paymentMethods', $paymentMethods);
}
if (!$socialNetworks){
$socialNetworks=array("facebook"=>true, "google"=>true, "twitter"=>true, "linkedin"=>true, "yahoo"=>true);
update_option('bachbill_social_networks', $socialNetworks);
}
$paymentMethods=array("paypal"=>true, "creditCards"=>false);
update_option('bachbill_paymentMethods', $paymentMethods);
$adminAreaId=get_option('bachbill_adminAreaId');
$adminUserId=get_option('bachbill_adminUserId');
$adminUserPassword=get_option('bachbill_adminUserPassword');
$endUserAreaId=get_option('bachbill_endUserAreaId');
$priceplanId=get_option('bachbill_priceplanId');
$useSSL=get_option('bachbill_useSSL');
$currency=get_option('bachbill_currency');
$api=getBachbillApi();
$api->setAdminAreaId($adminAreaId);
$api->setAdminUserId($adminUserId);
$api->setAdminUserPassword($adminUserPassword);
if ($action=='configure'){
$api->setParam('action', 'set');
$api->setParam('paypalEnvironment', $_POST['paypalEnvironment']);
$api->setParam('paypalApiUsername_sandbox', 'sdk-three_api1.sdk.com');
$api->setParam('paypalApiPassword_sandbox', 'QFZCWN5HZM8VBG7Q');
$api->setParam('paypalApiSignature_sandbox', 'A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI');
$api->setParam('paypalApiUsername_live', $_POST['paypalApiUsername_live']);
$api->setParam('paypalApiPassword_live', $_POST['paypalApiPassword_live']);
$api->setParam('paypalApiSignature_live', $_POST['paypalApiSignature_live']);
$api->setParam('currency', $_POST['currency']);
$taxPercentage=$_POST['taxPercentage'];
$taxPercentage=$taxPercentage==''?0:$taxPercentage;
$api->setParam('taxPercentage', $taxPercentage);
}else {
$api->setParam('action', 'get');
}
$res=$api->callOnIncomingUrlAction($priceplanId, '/pushConfig');
if ($api->hasErrors()){
?>
getErrorMessage();?>