Ejemplo n.º 1
0
 /**
  * Return review information for last page of checkout
  * @return  string
  */
 public function review()
 {
     $objAddress = Isotope::getCart()->getShippingAddress();
     if ($objAddress->id == Isotope::getCart()->getBillingAddress()->id) {
         return false;
     }
     return array('shipping_address' => array('headline' => $GLOBALS['TL_LANG']['MSC']['shipping_address'], 'info' => $objAddress->generateHtml(Isotope::getConfig()->getShippingFieldsConfig()), 'edit' => \Isotope\Module\Checkout::generateUrlForStep('address')));
 }
Ejemplo n.º 2
0
 /**
  * Return review information for last page of checkout
  * @return  string
  */
 public function review()
 {
     $blnRequiresPayment = Isotope::getCart()->requiresPayment();
     $blnRequiresShipping = Isotope::getCart()->requiresShipping();
     $objBillingAddress = Isotope::getCart()->getBillingAddress();
     $objShippingAddress = Isotope::getCart()->getShippingAddress();
     $strHeadline = $GLOBALS['TL_LANG']['MSC']['billing_address'];
     if ($blnRequiresPayment && $blnRequiresShipping && $objBillingAddress->id == $objShippingAddress->id) {
         $strHeadline = $GLOBALS['TL_LANG']['MSC']['billing_shipping_address'];
     } elseif ($blnRequiresShipping && $objBillingAddress->id == $objShippingAddress->id) {
         $strHeadline = $GLOBALS['TL_LANG']['MSC']['shipping_address'];
     } elseif (!$blnRequiresPayment && !$blnRequiresShipping) {
         $strHeadline = $GLOBALS['TL_LANG']['MSC']['customer_address'];
     }
     return array('billing_address' => array('headline' => $strHeadline, 'info' => $objBillingAddress->generateHtml(Isotope::getConfig()->getBillingFieldsConfig()), 'edit' => \Isotope\Module\Checkout::generateUrlForStep('address')));
 }
Ejemplo n.º 3
0
 /**
  * Return review information for last page of checkout
  * @return  string
  */
 public function review()
 {
     return array('payment_method' => array('headline' => $GLOBALS['TL_LANG']['MSC']['payment_method'], 'info' => Isotope::getCart()->getDraftOrder()->getPaymentMethod()->checkoutReview(), 'note' => Isotope::getCart()->getDraftOrder()->getPaymentMethod()->note, 'edit' => \Isotope\Module\Checkout::generateUrlForStep('payment')));
 }
Ejemplo n.º 4
0
 /**
  * Redirect the Sparkasse server to our error page
  * @param array
  */
 private function redirectError($arrData)
 {
     $strUrl = Checkout::generateUrlForStep('failed', null, \PageModel::findWithDetails((int) $arrData['sessionid']));
     // 200 OK
     $objResponse = new Response('redirecturlf=' . \Environment::get('base') . $strUrl . '?reason=' . $arrData['directPosErrorMessage']);
     $objResponse->send();
 }
Ejemplo n.º 5
0
    /**
     * Redirect client on WorldPay site to the confirmation page
     * @param   IsotopeProductCollection
     */
    protected function postsaleSuccess($objOrder)
    {
        $objPage = \PageModel::findWithDetails((int) \Input::post('M_pageId'));
        $strUrl = \Environment::get('base') . Checkout::generateUrlForStep('complete', $objOrder, $objPage);
        // Output a HTML page to redirect the client from WorldPay back to the shop
        echo '
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>The Tulle Factory</title>
<meta http-equiv="refresh" content="0; url=' . $strUrl . '">
</head>
<body>
Redirecting back to shop...
</body>
</html>
';
        exit;
    }
Ejemplo n.º 6
0
 /**
  * Return review information for last page of checkout
  * @return  string
  */
 public function review()
 {
     return array('shipping_method' => array('headline' => $GLOBALS['TL_LANG']['MSC']['shipping_method'], 'info' => Isotope::getCart()->getShippingMethod()->checkoutReview(), 'note' => Isotope::getCart()->getShippingMethod()->note, 'edit' => \Isotope\Module\Checkout::generateUrlForStep('shipping')));
 }
Ejemplo n.º 7
0
 /**
  * Prepare PSP params
  *
  * @param Order  $objOrder
  * @param \Isotope\Module\Checkout $objModule
  *
  * @return array
  */
 protected function preparePSPParams($objOrder, $objModule)
 {
     $objBillingAddress = $objOrder->getBillingAddress();
     return array('PSPID' => $this->psp_pspid, 'ORDERID' => $objOrder->id, 'AMOUNT' => round($objOrder->getTotal() * 100), 'CURRENCY' => $objOrder->currency, 'LANGUAGE' => $GLOBALS['TL_LANGUAGE'] . '_' . strtoupper($GLOBALS['TL_LANGUAGE']), 'CN' => $objBillingAddress->firstname . ' ' . $objBillingAddress->lastname, 'EMAIL' => $objBillingAddress->email, 'OWNERZIP' => $objBillingAddress->postal, 'OWNERADDRESS' => $objBillingAddress->street_1, 'OWNERADDRESS2' => $objBillingAddress->street_2, 'OWNERCTY' => strtoupper($objBillingAddress->country), 'OWNERTOWN' => $objBillingAddress->city, 'OWNERTELNO' => $objBillingAddress->phone, 'ACCEPTURL' => \Environment::get('base') . $objModule->generateUrlForStep('complete', $objOrder), 'DECLINEURL' => \Environment::get('base') . $objModule->generateUrlForStep('failed'), 'BACKURL' => \Environment::get('base') . $objModule->generateUrlForStep('review'), 'PARAMPLUS' => 'mod=pay&amp;id=' . $this->id, 'TP' => $this->psp_dynamic_template ?: '');
 }