public function creditRequest($hash_in) { $hash_out = array('litleTxnId' => XmlFields::returnArrayValue($hash_in, 'litleTxnId'), 'orderId' => XmlFields::returnArrayValue($hash_in, 'orderId'), 'amount' => XmlFields::returnArrayValue($hash_in, 'amount'), 'surchargeAmount' => XmlFields::returnArrayValue($hash_in, 'surchargeAmount'), 'orderSource' => XmlFields::returnArrayValue($hash_in, 'orderSource'), 'billToAddress' => XmlFields::contact(XMLFields::returnArrayValue($hash_in, 'billToAddress')), 'card' => XmlFields::cardType(XMLFields::returnArrayValue($hash_in, 'card')), 'paypal' => XmlFields::credit_payPal(XMLFields::returnArrayValue($hash_in, 'paypal')), 'token' => XmlFields::cardTokenType(XMLFields::returnArrayValue($hash_in, 'token')), 'paypage' => XmlFields::cardPaypageType(XMLFields::returnArrayValue($hash_in, 'paypage')), 'customBilling' => XmlFields::customBilling(XMLFields::returnArrayValue($hash_in, 'customBilling')), 'taxBilling' => XmlFields::taxBilling(XMLFields::returnArrayValue($hash_in, 'taxBilling')), 'billMeLaterRequest' => XmlFields::billMeLaterRequest(XMLFields::returnArrayValue($hash_in, 'billMeLaterRequest')), 'enhancedData' => XmlFields::enhancedData(XMLFields::returnArrayValue($hash_in, 'enhancedData')), 'processingInstructions' => XmlFields::processingInstructions(XMLFields::returnArrayValue($hash_in, 'processingInstructions')), 'pos' => XmlFields::pos(XMLFields::returnArrayValue($hash_in, 'pos')), 'amexAggregatorData' => XmlFields::amexAggregatorData(XMLFields::returnArrayValue($hash_in, 'amexAggregatorData')), 'payPalNotes' => XmlFields::returnArrayValue($hash_in, 'payPalNotes'), 'actionReason' => XmlFields::returnArrayValue($hash_in, 'actionReason')); $choice_hash = array($hash_out['card'], $hash_out['paypal'], $hash_out['token'], $hash_out['paypage']); $creditResponse = LitleOnlineRequest::processRequest($hash_out, $hash_in, 'credit', $choice_hash); return $creditResponse; }
public function getAddressInfo($order_info, $addressType) { $retArray = array(); $retArray["firstName"] = XMLFields::returnArrayValue($order_info, $addressType . "_firstname"); //$retArray["middleInitial"]= XMLFields::returnArrayValue($hash_in, ($addressType . "_lastname") ); $retArray["lastName"] = XMLFields::returnArrayValue($order_info, $addressType . "_lastname"); //$retArray["name"] = XMLFields::returnArrayValue($order_info, ($addressType . "_firstname") ); $retArray["companyName"] = XMLFields::returnArrayValue($order_info, $addressType . "_company"); $retArray["addressLine1"] = XMLFields::returnArrayValue($order_info, $addressType . "_address_1"); $retArray["addressLine2"] = XMLFields::returnArrayValue($order_info, $addressType . "_address_2"); $retArray["city"] = XMLFields::returnArrayValue($order_info, $addressType . "_city"); $retArray["state"] = XMLFields::returnArrayValue($order_info, $addressType . "_zone"); $retArray["zip"] = XMLFields::returnArrayValue($order_info, $addressType . "_postcode"); //$retArray["country"] = XMLFields::returnArrayValue($order_info, ($addressType . "_country") ); $retArray["country"] = XMLFields::returnArrayValue($order_info, $addressType . "_iso_code_2"); $retArray["email"] = XMLFields::returnArrayValue($order_info, "email"); $retArray["phone"] = XMLFields::returnArrayValue($order_info, "telephone"); return $retArray; }
public static function createCreditHash($hash_in) { $hash_out = array('litleTxnId' => XmlFields::returnArrayValue($hash_in, 'litleTxnId'), 'id' => Checker::requiredField(XmlFields::returnArrayValue($hash_in, 'id')), 'orderId' => XmlFields::returnArrayValue($hash_in, 'orderId'), 'amount' => XmlFields::returnArrayValue($hash_in, 'amount'), 'secondaryAmount' => XmlFields::returnArrayValue($hash_in, 'secondaryAmount'), 'surchargeAmount' => XmlFields::returnArrayValue($hash_in, 'surchargeAmount'), 'orderSource' => XmlFields::returnArrayValue($hash_in, 'orderSource'), 'billToAddress' => XmlFields::contact(XMLFields::returnArrayValue($hash_in, 'billToAddress')), 'card' => XmlFields::cardType(XMLFields::returnArrayValue($hash_in, 'card')), 'paypal' => XmlFields::credit_payPal(XMLFields::returnArrayValue($hash_in, 'paypal')), 'token' => XmlFields::cardTokenType(XMLFields::returnArrayValue($hash_in, 'token')), 'paypage' => XmlFields::cardPaypageType(XMLFields::returnArrayValue($hash_in, 'paypage')), 'customBilling' => XmlFields::customBilling(XMLFields::returnArrayValue($hash_in, 'customBilling')), 'taxBilling' => XmlFields::taxBilling(XMLFields::returnArrayValue($hash_in, 'taxBilling')), 'billMeLaterRequest' => XmlFields::billMeLaterRequest(XMLFields::returnArrayValue($hash_in, 'billMeLaterRequest')), 'enhancedData' => XmlFields::enhancedData(XMLFields::returnArrayValue($hash_in, 'enhancedData')), 'processingInstructions' => XmlFields::processingInstructions(XMLFields::returnArrayValue($hash_in, 'processingInstructions')), 'pos' => XmlFields::pos(XMLFields::returnArrayValue($hash_in, 'pos')), 'amexAggregatorData' => XmlFields::amexAggregatorData(XMLFields::returnArrayValue($hash_in, 'amexAggregatorData')), 'payPalNotes' => XmlFields::returnArrayValue($hash_in, 'payPalNotes'), 'actionReason' => XmlFields::returnArrayValue($hash_in, 'actionReason')); return $hash_out; }