本文整理汇总了PHP中Mage_Sales_Model_Quote::getBaseCurrencyCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote::getBaseCurrencyCode方法的具体用法?PHP Mage_Sales_Model_Quote::getBaseCurrencyCode怎么用?PHP Mage_Sales_Model_Quote::getBaseCurrencyCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote::getBaseCurrencyCode方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start
/**
* Reserve order ID for specified quote and start checkout on PayPal
* @return string
*/
public function start($returnUrl, $cancelUrl)
{
$this->_quote->reserveOrderId()->save();
// prepare API
$this->_getApi();
$this->_api->setAmount($this->_quote->getBaseGrandTotal())->setCurrencyCode($this->_quote->getBaseCurrencyCode())->setInvNum($this->_quote->getReservedOrderId())->setReturnUrl($returnUrl)->setCancelUrl($cancelUrl)->setSolutionType($this->_config->solutionType)->setPaymentAction($this->_config->paymentAction);
// supress or export shipping address
if ($this->_quote->getIsVirtual()) {
$this->_api->setSuppressShipping(true);
} else {
$address = $this->_quote->getShippingAddress();
$isOverriden = 0;
if (true === $address->validate()) {
$isOverriden = 1;
$this->_api->setAddress($address);
}
$this->_quote->getPayment()->setAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_OVERRIDEN, $isOverriden);
$this->_quote->getPayment()->save();
}
// add line items
if ($this->_config->lineItemsEnabled) {
list($items, $totals) = Mage::helper('paypal')->prepareLineItems($this->_quote);
$this->_api->setLineItems($items)->setLineItemTotals($totals);
}
$this->_config->exportExpressCheckoutStyleSettings($this->_api);
// call API and redirect with token
$this->_api->callSetExpressCheckout();
$token = $this->_api->getToken();
$this->_redirectUrl = $this->_config->getExpressCheckoutStartUrl($token);
return $token;
}
示例2: doTransaction
/**
* Call Transaction API (Authorized & Capture at the same time)
*
* @param Eway_Rapid31_Model_Response $response
* @return Eway_Rapid31_Model_Response
*/
public function doTransaction(Eway_Rapid31_Model_Response $response)
{
$this->unsetData();
$this->_buildRequest();
$this->setMethod(Eway_Rapid31_Model_Config::METHOD_TOKEN_PAYMENT);
$items = $this->_quote->getAllVisibleItems();
$lineItems = array();
foreach ($items as $item) {
/* @var Mage_Sales_Model_Order_Item $item */
$lineItem = Mage::getModel('ewayrapid/field_lineItem');
$lineItem->setSKU($item->getSku());
$lineItem->setDescription(substr($item->getName(), 0, 26));
$lineItem->setQuantity($item->getQty());
$lineItem->setUnitCost(round($item->getBasePrice() * 100));
$lineItem->setTax(round($item->getBaseTaxAmount() * 100));
$lineItem->setTotal(round($item->getBaseRowTotalInclTax() * 100));
$lineItems[] = $lineItem;
}
$this->setItems($lineItems);
$this->setItems(false);
// add Payment
$amount = round($this->_quote->getBaseGrandTotal() * 100);
$paymentParam = Mage::getModel('ewayrapid/field_payment');
$paymentParam->setTotalAmount($amount);
$paymentParam->setCurrencyCode($this->_quote->getBaseCurrencyCode());
$this->setPayment($paymentParam);
$customerParam = $this->getCustomer();
$customerParam->setTokenCustomerID($response->getTokenCustomerID());
$this->setCustomer($customerParam);
$response = $this->_doRapidAPI('Transaction');
return $response;
}
示例3: toOrder
/**
* Convert quote model to order model
*
* @param Mage_Sales_Model_Quote $quote
* @return Mage_Sales_Model_Order
*/
public function toOrder(Mage_Sales_Model_Quote $quote, $order = null)
{
if (!$order instanceof Mage_Sales_Model_Order) {
$order = Mage::getModel('sales/order');
}
/* @var $order Mage_Sales_Model_Order */
$order->setStoreId($quote->getStoreId())->setQuoteId($quote->getId())->setRemoteIp($quote->getRemoteIp())->setCustomerId($quote->getCustomerId())->setCustomerEmail($quote->getCustomerEmail())->setCustomerFirstname($quote->getCustomerFirstname())->setCustomerLastname($quote->getCustomerLastname())->setCustomerGroupId($quote->getCustomerGroupId())->setCustomerTaxClassId($quote->getCustomerTaxClassId())->setCustomerNote($quote->getCustomerNote())->setCustomerNoteNotify($quote->getCustomerNoteNotify())->setCustomerIsGuest($quote->getCustomerIsGuest())->setBaseCurrencyCode($quote->getBaseCurrencyCode())->setStoreCurrencyCode($quote->getStoreCurrencyCode())->setOrderCurrencyCode($quote->getQuoteCurrencyCode())->setStoreToBaseRate($quote->getStoreToBaseRate())->setStoreToOrderRate($quote->getStoreToQuoteRate())->setCouponCode($quote->getCouponCode())->setGiftcertCode($quote->getGiftcertCode())->setIsVirtual($quote->getIsVirtual())->setIsMultiPayment($quote->getIsMultiPayment())->setAppliedRuleIds($quote->getAppliedRuleIds());
Mage::dispatchEvent('sales_convert_quote_to_order', array('order' => $order, 'quote' => $quote));
return $order;
}
示例4: getCurrency
/**
* Returns the currency compliant to ISO 4217 (3 char code)
* @return string 3 Character long currency code
*
* @param Mage_Sales_Model_Quote|Mage_Sales_Model_Order|Mage_Sales_Model_Order_Invoice|Mage_Sales_Model_Order_Creditmemo $object
* @return string
*/
public function getCurrency($object)
{
$currency = $object->getBaseCurrencyCode();
if (!Mage::helper('paymill/optionHelper')->isBaseCurrency()) {
if ($object instanceof Mage_Sales_Model_Quote) {
$currency = $object->getQuoteCurrencyCode();
} else {
$currency = $object->getOrderCurrencyCode();
}
}
return $currency;
}
示例5: start
/**
* Reserve order ID for specified quote and start checkout on PayPal
* @return string
*/
public function start($returnUrl, $cancelUrl)
{
$this->_quote->reserveOrderId()->save();
// prepare API
$this->_getApi();
$this->_api->setAmount($this->_quote->getBaseGrandTotal())->setCurrencyCode($this->_quote->getBaseCurrencyCode())->setInvNum($this->_quote->getReservedOrderId())->setReturnUrl($returnUrl)->setCancelUrl($cancelUrl)->setSolutionType($this->_config->solutionType)->setPaymentAction($this->_config->paymentAction);
if ($this->_giropayUrls) {
list($successUrl, $cancelUrl, $pendingUrl) = $this->_giropayUrls;
$this->_api->addData(array('giropay_cancel_url' => $cancelUrl, 'giropay_success_url' => $successUrl, 'giropay_bank_txn_pending_url' => $pendingUrl));
}
// supress or export shipping address
if ($this->_quote->getIsVirtual()) {
$this->_api->setSuppressShipping(true);
} else {
$address = $this->_quote->getShippingAddress();
$isOverriden = 0;
if (true === $address->validate()) {
$isOverriden = 1;
$this->_api->setAddress($address);
}
$this->_quote->getPayment()->setAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_OVERRIDEN, $isOverriden);
$this->_quote->getPayment()->save();
}
// add line items
if ($this->_config->lineItemsEnabled && Mage::helper('paypal')->doLineItemsMatchAmount($this->_quote, $this->_quote->getBaseGrandTotal())) {
//For transfering line items order amount must be equal to cart total amount
list($items, $totals) = Mage::helper('paypal')->prepareLineItems($this->_quote);
$this->_api->setLineItems($items)->setLineItemTotals($totals);
}
$this->_config->exportExpressCheckoutStyleSettings($this->_api);
// call API and redirect with token
$this->_api->callSetExpressCheckout();
$token = $this->_api->getToken();
$this->_redirectUrl = $this->_config->getExpressCheckoutStartUrl($token);
return $token;
}
示例6: _reCalculateToStoreCurrency
/**
* Recalculate amount to store currency
*
* @param float $amount
* @param Mage_Sales_Model_Quote $quote
* @return float
*/
protected function _reCalculateToStoreCurrency($amount, $quote)
{
if ($quote->getQuoteCurrencyCode() != $quote->getBaseCurrencyCode()) {
$amount = $amount * $quote->getStoreToQuoteRate();
$amount = Mage::app()->getStore()->roundPrice($amount);
}
return $amount;
}
示例7: _buildRequest
/**
* Build the request with necessary parameters for doAuthorisation() and doTransaction()
*
* @param Mage_Sales_Model_Order_Payment $payment
* @param $amount
* @return Eway_Rapid31_Model_Request_Direct
*/
protected function _buildRequest(Mage_Sales_Model_Quote $quote, $amount)
{
// Empty Varien_Object's data
$this->unsetData();
$billing = $quote->getBillingAddress();
$shipping = $quote->getShippingAddress();
$this->setCustomerIP(Mage::helper('core/http')->getRemoteAddr());
if (Mage::helper('ewayrapid')->isBackendOrder()) {
$this->setTransactionType(Eway_Rapid31_Model_Config::TRANSACTION_MOTO);
} else {
$this->setTransactionType(Eway_Rapid31_Model_Config::TRANSACTION_PURCHASE);
}
$this->setDeviceID('Magento ' . Mage::getEdition() . ' ' . Mage::getVersion());
$this->setShippingMethod('Other');
$paymentParam = Mage::getModel('ewayrapid/field_payment');
$paymentParam->setTotalAmount($amount);
$paymentParam->setCurrencyCode($quote->getBaseCurrencyCode());
$this->setPayment($paymentParam);
$customerParam = Mage::getModel('ewayrapid/field_customer');
$customerParam->setTitle($billing->getPrefix())->setFirstName($billing->getFirstname())->setLastName($billing->getLastname())->setCompanyName($billing->getCompany())->setJobDescription('')->setStreet1($billing->getStreet1())->setStreet2($billing->getStreet2())->setCity($billing->getCity())->setState($billing->getRegion())->setPostalCode($billing->getPostcode())->setCountry(strtolower($billing->getCountryModel()->getIso2Code()))->setEmail($billing->getEmail())->setPhone($billing->getTelephone())->setMobile('')->setComments('')->setFax($billing->getFax())->setUrl('');
$infoCard = Mage::getSingleton('core/session')->getInfoCard();
if ($infoCard && $infoCard->getCard() && $infoCard->getOwner() && !$this->getTokenInfo()) {
$cardDetails = Mage::getModel('ewayrapid/field_cardDetails');
$cardDetails->setName($infoCard->getOwner())->setNumber($infoCard->getCard())->setExpiryMonth($infoCard->getExpMonth())->setExpiryYear($infoCard->getExpYear())->setCVN($infoCard->getCid());
$customerParam->setCardDetails($cardDetails);
}
if ($quote->getTokenCustomerID()) {
$customerParam->setTokenCustomerID($quote->getTokenCustomerID());
} elseif ($token = $this->getTokenInfo()) {
$customerParam->setTokenCustomerID($token->getToken() ? $token->getToken() : $token->getTokenCustomerID());
}
$this->setCustomer($customerParam);
$shippingParam = Mage::getModel('ewayrapid/field_shippingAddress');
$shippingParam->setFirstName($shipping->getFirstname())->setLastName($shipping->getLastname())->setStreet1($shipping->getStreet1())->setStreet2($shipping->getStreet2())->setCity($shipping->getCity())->setState($shipping->getRegion())->setPostalCode($shipping->getPostcode())->setCountry(strtolower($shipping->getCountryModel()->getIso2Code()))->setEmail($shipping->getEmail())->setPhone($shipping->getTelephone())->setFax($shipping->getFax());
$this->setShippingAddress($shippingParam);
$orderItems = $quote->getAllVisibleItems();
$lineItems = array();
foreach ($orderItems as $orderItem) {
/* @var Mage_Sales_Model_Order_Item $orderItem */
$lineItem = Mage::getModel('ewayrapid/field_lineItem');
$lineItem->setSKU($orderItem->getSku());
$lineItem->setDescription(substr($orderItem->getName(), 0, 26));
$lineItem->setQuantity($orderItem->getQtyOrdered());
$lineItem->setUnitCost(round($orderItem->getBasePrice() * 100));
$lineItem->setTax(round($orderItem->getBaseTaxAmount() * 100));
$lineItem->setTotal(round($orderItem->getBaseRowTotalInclTax() * 100));
$lineItems[] = $lineItem;
}
$this->setItems($lineItems);
if ($this->getTransMethod() == Eway_Rapid31_Model_Config::PAYPAL_STANDARD_METHOD) {
$this->setItems(false);
}
return $this;
}
示例8: getXmlCart
/**
* Build XML-based Cart for Checkout by Amazon
*
* @param Mage_Sales_Model_Quote
* @return string
*/
public function getXmlCart(Mage_Sales_Model_Quote $quote)
{
$_xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<Order xmlns="http://payments.amazon.com/checkout/2008-11-30/">' . "\n";
if (!$quote->hasItems()) {
return false;
}
$_xml .= " <ClientRequestId>{$quote->getId()}</ClientRequestId>\n";
// Returning parametr
# ."<ExpirationDate></ExpirationDate>";
$_xml .= " <Cart>\n" . " <Items>\n";
foreach ($quote->getAllVisibleItems() as $_item) {
$_xml .= " <Item>\n" . " <SKU>{$_item->getSku()}/{$_item->getId()}</SKU>\n" . " <MerchantId>{$this->getMerchantId()}</MerchantId>\n" . " <Title>{$_item->getName()}</Title>\n" . " <Price>\n" . " <Amount>{$this->formatAmount($_item->getPrice())}</Amount>\n" . " <CurrencyCode>{$quote->getBaseCurrencyCode()}</CurrencyCode>\n" . " </Price>\n" . " <Quantity>{$_item->getQty()}</Quantity>\n" . " <Weight>\n" . " <Amount>{$this->formatAmount($_item->getWeight())}</Amount>\n" . " <Unit>lb</Unit>\n" . " </Weight>\n";
$_xml .= " </Item>\n";
}
$_xml .= " </Items>\n" . " <CartPromotionId>cart-total-discount</CartPromotionId>\n" . " </Cart>\n";
$_xml .= " <IntegratorId>A2ZZYWSJ0WMID8MAGENTO</IntegratorId>\n" . " <IntegratorName>Varien</IntegratorName>\n";
$_xml .= " <OrderCalculationCallbacks>\n" . " <CalculateTaxRates>true</CalculateTaxRates>\n" . " <CalculatePromotions>true</CalculatePromotions>\n" . " <CalculateShippingRates>true</CalculateShippingRates>\n" . " <OrderCallbackEndpoint>" . Mage::getUrl('amazonpayments/cba/callback', array('_secure' => true)) . "</OrderCallbackEndpoint>\n" . " <ProcessOrderOnCallbackFailure>true</ProcessOrderOnCallbackFailure>\n" . " </OrderCalculationCallbacks>\n";
$_xml .= "</Order>\n";
return $_xml;
}
示例9: _processOrder
/**
* Place the order
*
* @return bool
*/
protected function _processOrder()
{
if (!$this->_auth()) {
return false;
}
if (!$this->_validateQuote()) {
return false;
}
// Push address to the quote, set totals,
// Convert quote to the order,
// Set rakuten_order attribute to "1"
try {
// To avoid duplicates look for order with the same Rakuten order no
$orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('ext_order_id', (string) $this->_request->order_no);
if (count($orders)) {
$this->_debugData['reason'] = 'The same order already placed';
return false;
}
// Import addresses and other data to quote
$this->_quote->setIsActive(true)->reserveOrderId();
$storeId = $this->_quote->getStoreId();
Mage::app()->setCurrentStore(Mage::app()->getStore($storeId));
if ($this->_quote->getQuoteCurrencyCode() != $this->_quote->getBaseCurrencyCode()) {
Mage::app()->getStore()->setCurrentCurrencyCode($this->_quote->getQuoteCurrencyCode());
}
$billing = $this->_convertAddress('client');
$this->_quote->setBillingAddress($billing);
$shipping = $this->_convertAddress('delivery_address');
$this->_quote->setShippingAddress($shipping);
$this->_convertTotals($this->_quote->getShippingAddress());
$this->_quote->getPayment()->importData(array('method' => 'rakuten'));
/**
* Convert quote to order
*
* @var $convertQuote Mage_Sales_Model_Convert_Quote
*/
$convertQuote = Mage::getSingleton('sales/convert_quote');
/* @var $order Mage_Sales_Model_Order */
$order = $convertQuote->toOrder($this->_quote);
if ($this->_quote->isVirtual()) {
$convertQuote->addressToOrder($this->_quote->getBillingAddress(), $order);
} else {
$convertQuote->addressToOrder($this->_quote->getShippingAddress(), $order);
}
$order->setExtOrderId((string) $this->_request->order_no);
$order->setExtCustomerId((string) $this->_request->client->client_id);
if (!$order->getCustomerEmail()) {
$order->setCustomerEmail($billing->getEmail())->setCustomerPrefix($billing->getPrefix())->setCustomerFirstname($billing->getFirstname())->setCustomerMiddlename($billing->getMiddlename())->setCustomerLastname($billing->getLastname())->setCustomerSuffix($billing->getSuffix())->setCustomerIsGuest(1);
}
$order->setBillingAddress($convertQuote->addressToOrderAddress($this->_quote->getBillingAddress()));
if (!$this->_quote->isVirtual()) {
$order->setShippingAddress($convertQuote->addressToOrderAddress($this->_quote->getShippingAddress()));
}
/** @var $item Mage_Sales_Model_Quote_Item */
foreach ($this->_quote->getAllItems() as $item) {
$orderItem = $convertQuote->itemToOrderItem($item);
if ($item->getParentItem()) {
$orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId()));
}
$order->addItem($orderItem);
}
/**
* Adding transaction for correct transaction information displaying on the order view in the admin.
* It has no influence on the API interaction logic.
*
* @var $payment Mage_Sales_Model_Order_Payment
*/
$payment = Mage::getModel('sales/order_payment');
$payment->setMethod('rakuten')->setTransactionId((string) $this->_request->order_no)->setIsTransactionClosed(false);
$order->setPayment($payment);
$payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
$order->setCanShipPartiallyItem(false);
$message = '';
if (trim((string) $this->_request->comment_client) != '') {
$message .= $this->__('Customer\'s Comment: %s', '<strong>' . trim((string) $this->_request->comment_client) . '</strong><br />');
}
$message .= $this->__('Rakuten Order No: %s', '<strong>' . (string) $this->_request->order_no . '</strong><br />') . $this->__('Rakuten Client ID: %s', '<strong>' . (string) $this->_request->client->client_id . '</strong><br />');
$order->addStatusHistoryComment($message);
$order->setRakutenOrder(1);
// Custom attribute for fast filtering of orders placed via Rakuten Checkout
$order->place();
$order->save();
// $order->sendNewOrderEmail();
$this->_quote->setIsActive(false)->save();
Mage::dispatchEvent('checkout_submit_all_after', array('order' => $order, 'quote' => $this->_quote));
} catch (Exception $e) {
$this->_debugData['exception'] = $e->getMessage();
Mage::logException($e);
return false;
}
return true;
}
示例10: buildAmount
/**
* Build Amount
*
* @param Mage_Sales_Model_Quote $quote
* @return Amount
*/
protected function buildAmount($quote)
{
$details = new Details();
$details->setShipping($quote->getShippingAddress()->getBaseShippingAmount())->setTax($quote->getBillingAddress()->getBaseTaxAmount() + $quote->getBillingAddress()->getBaseHiddenTaxAmount() + $quote->getShippingAddress()->getBaseTaxAmount() + $quote->getShippingAddress()->getBaseHiddenTaxAmount())->setSubtotal($quote->getBaseSubtotal());
$totals = $quote->getTotals();
if (isset($totals['discount']) && $totals['discount']->getValue()) {
$details->setShippingDiscount(-$totals['discount']->getValue());
}
$amount = new Amount();
$amount->setCurrency($quote->getBaseCurrencyCode())->setDetails($details)->setTotal($quote->getBaseGrandTotal());
return $amount;
}
示例11: CreateMagentoShopRequest
//.........这里部分代码省略.........
}
$request->setTelephonePrivate((string) trim($quote->getBillingAddress()->getTelephone(), '-'));
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["telephone"])) {
$request->setTelephonePrivate(trim($_POST["billing"]["telephone"], '-'));
}
$request->setEmail((string) $quote->getBillingAddress()->getEmail());
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["email"])) {
$request->setEmail((string) $_POST["billing"]["email"]);
}
Mage::getSingleton('checkout/session')->setData('gender_amasty', '');
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty') {
$g = isset($_POST["billing"]["gender"]) ? $_POST["billing"]["gender"] : '';
$request->setGender($g);
Mage::getSingleton('checkout/session')->setData('gender_amasty', $g);
}
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && !empty($_POST["billing"]["prefix"])) {
if (strtolower($_POST["billing"]["prefix"]) == 'herr') {
$request->setGender('1');
Mage::getSingleton('checkout/session')->setData('gender_amasty', '1');
} else {
if (strtolower($_POST["billing"]["prefix"]) == 'frau') {
$request->setGender('2');
Mage::getSingleton('checkout/session')->setData('gender_amasty', '2');
}
}
}
$extraInfo["Name"] = 'ORDERCLOSED';
$extraInfo["Value"] = 'NO';
$request->setExtraInfo($extraInfo);
$extraInfo["Name"] = 'ORDERAMOUNT';
$extraInfo["Value"] = number_format($quote->getGrandTotal(), 2, '.', '');
$request->setExtraInfo($extraInfo);
$extraInfo["Name"] = 'ORDERCURRENCY';
$extraInfo["Value"] = $quote->getBaseCurrencyCode();
$request->setExtraInfo($extraInfo);
$extraInfo["Name"] = 'IP';
$extraInfo["Value"] = $this->getClientIp();
$request->setExtraInfo($extraInfo);
$sesId = Mage::getSingleton('checkout/session')->getData("byjuno_session_id");
if (Mage::getStoreConfig('byjuno/api/tmxenabled', Mage::app()->getStore()) == 'enable' && !empty($sesId)) {
$extraInfo["Name"] = 'DEVICE_FINGERPRINT_ID';
$extraInfo["Value"] = Mage::getSingleton('checkout/session')->getData("byjuno_session_id");
$request->setExtraInfo($extraInfo);
}
/* shipping information */
if (!$quote->isVirtual()) {
$extraInfo["Name"] = 'DELIVERY_FIRSTNAME';
$extraInfo["Value"] = $quote->getShippingAddress()->getFirstname();
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && empty($_POST["shipping"]["same_as_billing"])) {
if (!empty($_POST["shipping"]["firstname"])) {
$extraInfo["Value"] = $_POST["shipping"]["firstname"];
}
}
$request->setExtraInfo($extraInfo);
$extraInfo["Name"] = 'DELIVERY_LASTNAME';
$extraInfo["Value"] = $quote->getShippingAddress()->getLastname();
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && empty($_POST["shipping"]["same_as_billing"])) {
if (!empty($_POST["shipping"]["lastname"])) {
$extraInfo["Value"] = $_POST["shipping"]["lastname"];
}
}
$request->setExtraInfo($extraInfo);
$extraInfo["Name"] = 'DELIVERY_FIRSTLINE';
$extraInfo["Value"] = trim($quote->getShippingAddress()->getStreetFull());
if (Mage::getStoreConfig('byjuno/api/plugincheckouttype', Mage::app()->getStore()) == 'amasty' && empty($_POST["shipping"]["same_as_billing"])) {
$extraInfo["Value"] = '';