Exemplo n.º 1
0
 function eZRedirectGateway()
 {
     //__DEBUG__
     $this->logger = eZPaymentLogger::CreateForAdd("var/log/eZRedirectGateway.log");
     $this->logger->writeTimedString('eZRedirectGateway::eZRedirectGateway()');
     //___end____
 }
Exemplo n.º 2
0
    function eZPaymentGatewayType()
    {
        $this->logger   = eZPaymentLogger::CreateForAdd( "var/log/eZPaymentGatewayType.log" );

        $this->eZWorkflowEventType( eZPaymentGatewayType::WORKFLOW_TYPE_STRING, ezpI18n::tr( 'kernel/workflow/event', "Payment Gateway" ) );
        $this->loadAndRegisterGateways();
    }
Exemplo n.º 3
0
 function eZPaymentCallbackChecker($iniFile)
 {
     $this->logger = eZPaymentLogger::CreateForAdd('var/log/eZPaymentChecker.log');
     $this->ini = eZINI::instance($iniFile);
 }
Exemplo n.º 4
0
 function eZPaypalChecker($iniFile)
 {
     $this->eZPaymentCallbackChecker($iniFile);
     $this->logger = eZPaymentLogger::CreateForAdd('var/log/eZPaypalChecker.log');
 }
Exemplo n.º 5
0
 function eZPaymentGateway()
 {
     $this->logger = eZPaymentLogger::CreateForAdd("var/log/eZPaymentGateway.log");
 }
Exemplo n.º 6
0
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of version 2.0 of the GNU General
//   Public License along with this program; if not, write to the Free
//   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
//   MA 02110-1301, USA.
//
//
// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
//
/*! \file notify_url.php
*/
$logger = eZPaymentLogger::CreateForAdd('var/log/eZPaypal_notify_url.log');
$checker = new eZPaypalChecker('paypal.ini');
if ($checker->createDataFromPOST()) {
    unset($_POST);
    if ($checker->requestValidation() && $checker->checkPaymentStatus()) {
        $orderID = $checker->getFieldValue('custom');
        if ($checker->setupOrderAndPaymentObject($orderID)) {
            $amount = $checker->getFieldValue('mc_gross');
            $currency = $checker->getFieldValue('mc_currency');
            if ($checker->checkAmount($amount) && $checker->checkCurrency($currency)) {
                $checker->approvePayment();
                $checker->updateStatus();
                $order = eZOrder::fetch($orderID);
                if (isset($order)) {
                    // Any special processing for the order goes here
                }