Exemple #1
0
 function transfer_Money($account_from, $account_to, $amount)
 {
     $verify = new verify();
     // We check if the paying account exists
     if (!$verify->verify_Account($account_from)) {
         echo "The paying account is not in our database";
         return false;
     }
     // We check for funds
     if (!$verify->check_Funds($account_from, $amount)) {
         echo "Insufficient funds";
         return false;
     }
     // We check if the receiving account exists
     if (!$verify->verify_Account($account_to)) {
         echo "The receiving account is not in our database";
         return false;
     }
     $this->make_Payment($account_from, $account_to, $amount);
     echo "Your payment was executed";
 }