Last active
October 6, 2015 07:22
-
-
Save piotr-galas/e8450c6947c5649b4fbe to your computer and use it in GitHub Desktop.
wery bad code _postPayment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function _postPayment( $data ) { | |
$app =JFactory::getApplication(); | |
$html = ""; | |
$get = $app->input->get->get('status', false); | |
if ( (bool) $get ) { | |
$vars = new JObject(); | |
if ($app->input->get->getString('status') == self::STATUS_OK) { | |
$vars->message = JText::_('J2STORE_CONFIRMED'); | |
} else { | |
$vars->message = JText::_('J2STORE_FAILED'); | |
} | |
$html = $this->_getLayout('postpayment', $vars); | |
} else { | |
$status = $this->getValidation($app->input); | |
if($status === self::STATUS_OK) { | |
if($this->setOrderStatus($app->input->getString('control'))) { | |
echo self::STATUS_OK; | |
} else { | |
echo self::STATUS_FAIL; | |
} | |
} else { | |
echo self::STATUS_FAIL; | |
} | |
$app->close(); | |
} | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment