2 /** @package verysimple::Payment */
5 * PaymentRequest is a generic object containing information necessary
6 * to process a payment through a payment gateway.
8 * your PaymentRequest can be processed independantly of payment gateway,
9 * it is best not to extend this class, rather write a PaymentProcessor
10 * that will work correctly for the particular payment gateway.
12 * @package verysimple::Payment
13 * @author VerySimple Inc.
14 * @copyright 1997-2007 VerySimple, Inc.
15 * @license http://www.gnu.org/licenses/lgpl.html LGPL
20 static $TRANSACTION_TYPE_AUTH_ONLY = "AUTH";
21 static $TRANSACTION_TYPE_AUTH_CAPTURE = "AUTH_CAPTURE";
22 public $SoftDescriptor = "";
23 public $OrderNumber = "";
24 public $InvoiceNumber = "";
25 public $CustomerFirstName = "";
26 public $CustomerLastName = "";
27 public $CustomerStreetAddress = "";
28 public $CustomerStreetAddress2 = "";
29 public $CustomerCity = "";
30 public $CustomerState = "";
31 public $CustomerZipCode = "";
32 public $CustomerCountry = "USA";
33 public $CustomerPhone = "";
34 public $CustomerEmail = "";
35 public $CustomerIP = "";
37 public $TransactionAmount = "";
39 public $CCNumber = "";
40 public $CCExpMonth = "";
41 public $CCExpYear = "";
42 public $CCSecurityCode = "";
43 public $TransactionCurrency = "USD";
45 // authorize.net specific
46 public $TransactionType = "AUTH_CAPTURE";
49 public $OrderString = "1~None~0.00~0~N~||";
50 public $CustomerName = "";
51 public $OrderDescription; // 22 chars (xxx*xxxxxxxxxxxxxxxxxx || xxxxxxx*xxxxxxxxxxxxxx || xxxxxxxxxxxx*xxxxxxxxx)
57 public $SerialNumber = "";
63 public $DeveloperSerialNumber = "";
68 final function __construct()
74 * Called by base object on construction.
76 * to handle any special initialization
80 $this->CustomerIP
= array_key_exists('REMOTE_ADDR', $_SERVER) ?
$_SERVER ['REMOTE_ADDR'] : '0.0.0.0';
84 * This will populate all properties from the provided array argument
85 * Example: $req->Read($_REQUEST)
91 foreach (get_object_vars($this) as $prop) {
92 if (array_key_exists($prop, $arr)) {
93 $this->$prop = $arr [$prop];