/** * @return array */ protected function buildStandardTransactionDetails() { global $order, $currencies, $customer_id, $products; $sagepayCurrency = $this->getSagepayCurrency(); $us_state_codes = SagepayUtil::getUsStateCodes(); $entries = array(); $entries['VPSProtocol'] = self::SP_PROTOCOL_VERSION; $entries['ApplyAVSCV2'] = (int) $this->getAvsSetting(); $entries['Apply3DSecure'] = (int) $this->get3dSecureSetting(); $entries['VendorTxCode'] = date('YmdHis') . $customer_id; $entries['Amount'] = number_format($order->info['total'] * $currencies->get_value($sagepayCurrency), $currencies->get_decimal_places($sagepayCurrency)); $entries['Currency'] = $sagepayCurrency; $entries['Description'] = "Goods from " . STORE_NAME; $entries['CustomerName'] = $order->billing['firstname'] . ' ' . $order->billing['lastname']; $entries['CustomerEmail'] = $order->customer['email_address']; $VendorEmailAddress = $this->getModuleDefineValue('_VENDOR_EMAIL'); if ($VendorEmailAddress == '') { $VendorEmailAddress = STORE_OWNER_EMAIL_ADDRESS; } $entries['VendorEMail'] = $VendorEmailAddress; $entries['SendEMail'] = $this->getEmailSendSettings(); $entries['eMailMessage'] = $this->getModuleDefineValue('_EMAILMSG'); $billingEntries = sagepayCustomer::setBillingEntries($order, $us_state_codes); if ($this->getModuleDefineValue('_TEST_STATUS') == 'test') { $billingEntries['BillingAddress1'] = '88'; $billingEntries['BillingPostCode'] = '412'; } $deliveryEntries = sagepayCustomer::setDeliveryEntries($order, $us_state_codes); $entries = array_merge($entries, $billingEntries, $deliveryEntries); if ($this->getModuleDefineValue('_SHOPCART') == 'true') { $entries['Basket'] = sagepayBasket::getCartContents($order); } return $entries; }