Example #1
0
 $Customer->address = "200 SW 1st Avenue";
 $Customer->city = "Fort Lauderdale";
 $Customer->zipcode = "33301";
 $Customer->state = "FL";
 $Customer->country = "US";
 $Customer->level = "";
 $amount = 10.0;
 //"mandatory
 $currency = 'ARS';
 //"mandatory
 echo "Processing Credit Card Sale\n";
 $ref_id = rand(1000, 9999);
 //"mandatory
 $description = "Order #" . $ref_id . " with Paytoo Merchant";
 $addinfo = "";
 $response = $soap->CreditCardSingleTransaction($CreditCard, $Customer, $amount, $currency, $ref_id, $description);
 if ($response->status == 'OK') {
     echo "Transaction has been processed\n";
     echo "Request ID: " . $response->request_id . "\n";
     echo "Tr. ID: " . $response->tr_id . "\n";
 } else {
     echo $response->status . " " . $response->msg . "\n";
 }
 echo "Processing Credit Card PreiAuth\n";
 $ref_id = rand(1000, 9999);
 //"mandatory
 $description = "Order #" . $ref_id . " with Paytoo Merchant";
 $addinfo = "";
 $response = $soap->CreditCardPreAuth($CreditCard, $Customer, $amount, $currency, $ref_id, $description);
 if ($response->status == 'OK' && $response->request_status == 'accepted') {
     echo "Request has been accepted\n";