<?php 















class Paymentaliexpress extends Payment {















	function __construct(&$locator) {















		$this->address  =& $locator->get('address');















		$this->cart     =& $locator->get('cart');















		$this->config   =& $locator->get('config');















		$this->currency =& $locator->get('currency');















		$this->customer =& $locator->get('customer');















		$this->database =& $locator->get('database');















		$this->language =& $locator->get('language');















		$this->mail     =& $locator->create('mail');















		$this->order    =& $locator->get('order');















		$this->request  =& $locator->get('request');















		$this->session  =& $locator->get('session');















		$this->shipping =& $locator->get('shipping');















		$this->tax      =& $locator->get('tax');















		$this->url      =& $locator->get('url');	  











		$this->language->load('extension/payment/aliexpress.php');







  	}











	function getTitle() {







		return $this->language->get('text_aliexpress_title');







  	}







  	function getMethod() {















		if ($this->config->get('aliexpress_status')) {















      		if (!$this->config->get('aliexpress_geo_zone_id')) {















        		$status = true;















      		} elseif ($this->database->getRows("select * from zone_to_geo_zone where geo_zone_id = '" . (int)$this->config->get('aliexpress_geo_zone_id') . "' and country_id = '" . (int)$this->address->getCountryId($this->session->get('payment_address_id')) . "' and (zone_id = '" . (int)$this->address->getZoneId($this->session->get('payment_address_id')) . "' or zone_id = '0')")) {















      		  	$status = true;















      		} else {















     	  		$status = false;















			}	















      	} else {











			$status = false;











		}	







		$customer_sql="select customer_id,current_points,country_id from customer where customer_id='?'";







        $customer_row=$this->database->getRow($this->database->parse($customer_sql, (int)$this->customer->getId()));     



	



		$method_data = array();







		if ($status) {  







          $description=$this->database->getRow("select extension_id from extension where filename='aliexpress.php'");  







			   $extension_description=$this->database->getRow("select description from extension_description where extension_id='".$description['extension_id']."'");  







	      		$method_data = array( 







	        		'id'         => 'aliexpress',







	        		'title'      => $this->language->get('text_aliexpress_title'),







					'sort_order' => $this->config->get('aliexpress_sort_order'),				







					'desc'       =>$extension_description['description']







	      		);















    	}















   















    	return $method_data;















  	}







 















  	function getActionUrl() {















		return 'https://www.beststoreitems.com/index.php?controller=checkout_aliexpress&order='.$this->order->getReference();















	}















	function callback() {







		







		$this->order->load($this->request->get('reference', 'post'));















		$this->order->process(17);















		print('<br>We have holded your order, After you transfer money to us by bank transfer,  Please email us following information so that we can check your payment asap.<br><br><br>







			  <table class="MsoNormalTable" style="width: 100%; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 0cm 0cm 0cm" cellpadding="0" width="100%" border="0">







                <tbody>







                    <tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; width: 37%; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent" width="50%">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><font face="Verdana">Your Order Reference:<o:p></o:p></font></span></p>







                        </td>







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; width: 63%; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent" width="50%">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><input maxlength="10" name="orderreference" type="text" /></span></p>







                        </td>







                    </tr>







					<tr style="mso-yfti-irow: 1; mso-yfti-firstrow: yes">







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; width: 37%; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent" width="37%">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><font face="Verdana">Sender Name:<o:p></o:p></font></span></p>







                        </td>







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; width: 63%; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent" width="63%">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><input maxlength="10" name="sendername" type="text" /></span></p>







                        </td>







                    </tr>







                    <tr style="mso-yfti-irow: 2">







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><font face="Verdana">Amount:<o:p></o:p></font></span></p>







                        </td>







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><input name="amount" type="text" /><o:p></o:p></span></p>







                        </td>







                    </tr>







                    <tr style="mso-yfti-irow: 3">







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><font face="Verdana">Payment Date:<o:p></o:p></font></span></p>







                        </td>







                        <td style="border-right: #ffffff; padding-right: 0cm; border-top: #ffffff; padding-left: 15pt; padding-bottom: 0cm; border-left: #ffffff; padding-top: 0cm; border-bottom: #ffffff; background-color: transparent">







                        <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 15.75pt; text-align: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="font-size: 9pt; color: #444444; font-family: "><input name="Paymentdate" type="text" /><o:p></o:p></span></p>







                        </td>







                    </tr>















                </tbody>







            </table>







<br>







Please click "Complete the Order" to complete your order, it will be kept in your Account center. Please remember to contact us after you paid.







<br><br><a href="https://www.beststoreitems.com/index.php?controller=account_history" title="Order History"><img border="0" src="https://www.beststoreitems.com/catalog/template/beststoreitems/image/complete.jpg" /></a>');







  	}















}















?>