function RunAdaptivePaymentSamples() { try { echo "Running AdaptiveAccounts Samples...\n"; $tempReturn1 = array(); $tempReturn2 = array(); $tempReturn1 = CreateAccount(); //Create Account personal and premium $tempReturn2 = CreateAccountBusiness(); //business $fundingSourceKey = AddBankAccount(); AddBankAccountDirect($tempReturn1); //AddBankAccount and AddBankAccountDirect are the two different usecase of the "AddBankAccount" API AddPaymentCard(); AddPaymentCardDirect($tempReturn2); //AddPaymentCard and AddPaymentCardDirect are the two different usecase of the "AddPaymentCard" API SetFundingSourceConfirmed(); GetVerifiedStatus(); } catch (Exception $ex) { echo $ex->getMessage(); } echo "\n\n ***** Done. *****\n\n"; //Reads enter key fread(STDIN, 1); }
function CreateAccountValues() { $AccountValues = ['Username', 'Password', 'Name', 'Phone', 'Email']; if (!CheckList($AccountValues)) { return false; } $account_values = GetList($AccountValues); CreateAccount($account_values[0], $account_values[1], $account_values[2], $account_values[3], $account_values[4], $account_values[5]); return true; }
function Step1CreateAccount() { $uniqueValue = get_unique_value(); $email = $uniqueValue . '@gmail.com'; $merchantAccountId = $uniqueValue; //Step 1 CreateAccount($merchantAccountId, $email); //Step 2 (Vindicia Engineer generally does this if you do not have the credit cards on file) //Once the payment method is added to the account via Step 2, //you will be able to access the PaymentMethod array item 0. Step2CreateCreditCard($merchantAccountId); return $merchantAccountId; }
$email = GetVariable("email"); $e = GetVariable("e"); $firstname = GetVariable("firstname"); $midname = GetVariable("midname"); $lastname = GetVariable("lastname"); $institution = GetVariable("institution"); $instance = GetVariable("instance"); $country = GetVariable("country"); $password = GetVariable("password"); /* database connection */ $link = mysql_connect($GLOBALS['db_hostname'], $GLOBALS['cfg']['mysqluser'], $GLOBALS['cfg']['mysqlpassword']) or die("Could not connect: " . mysql_error()); mysql_select_db($GLOBALS['cfg']['mysqldatabase']) or die("Could not select database<br>"); /* ----- determine which action to take ----- */ switch ($action) { case 'create': $msg = CreateAccount($email, $firstname, $midname, $lastname, $institution, $instance, $country, $password); if ($msg != "") { DisplayForm($msg, $email, $firstname, $midname, $lastname, $institution, $instance, $country); } else { DisplaySuccessMessage($email, $firstname, $midname, $lastname, $institution, $instance, $country, $password); } break; case 'r': ResetPasswordForm(""); break; case 'rp': ResetPassword($e); break; default: DisplayForm(""); }