예제 #1
0
파일: korta.php 프로젝트: grlf/eyedock
 public function process()
 {
     $this->result = $this->request->getPost();
     //        print_rr($downloadmd5);
     //        print_rre($this->result);
     parent::process();
 }
예제 #2
0
파일: coinbase.php 프로젝트: grlf/eyedock
 function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     $str = $request->getRawBody();
     $ret = @json_decode($str);
     if (!$ret) {
         throw new Am_Exception_InternalError("Coinbase: Can't decode postback: " . $ret);
     }
     $this->order = @$ret->order;
 }
예제 #3
0
 public function findTime()
 {
     $time = get_first($this->request->get('subscr_date'), $this->request->get('payment_date'));
     if (!$time) {
         return parent::findTime();
     }
     $d = new DateTime($time);
     $d->setTimezone(new DateTimeZone(date_default_timezone_get()));
     return $d;
 }
예제 #4
0
파일: Thanks.php 프로젝트: grlf/eyedock
 function process()
 {
     try {
         parent::process();
     } catch (Am_Exception_Paysystem_TransactionAlreadyHandled $e) {
         // do nothing if transaction is already handled
     }
     if (Am_Di::getInstance()->config->get('auto_login_after_signup')) {
         Am_Di::getInstance()->auth->setUser($this->invoice->getUser(), $this->request->getClientIp());
     }
 }
예제 #5
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $DR = preg_replace("/\\s/", "+", $request->get('DR', $_GET['DR']));
     $rc4 = new Crypt_RC4($plugin->getConfig('secret', 'ebskey'));
     $QueryString = base64_decode($DR);
     $rc4->decrypt($QueryString);
     $QueryString = split('&', $QueryString);
     foreach ($QueryString as $param) {
         $param = split('=', $param);
         $request->setParam($param[0], $param[1]);
     }
     parent::__construct($plugin, $request, $request, $invokeArgs);
 }
예제 #6
0
파일: hipay.php 프로젝트: grlf/eyedock
 function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     require_once dirname(__FILE__) . '/mapi/mapi_package.php';
     //        $r = HIPAY_MAPI_COMM_XML::analyzeNotificationXML($this->request->getPost('xml'), $operation, $status, $date,
     //            $time, $transid, $amount, $currency, $idformerchant, $merchantdatas, $emailClient, $subscriptionId, $refProduct);
     $str = $this->request->getPost('xml');
     //$request->getRawBody();
     $xml = simplexml_load_string($str);
     //$this->_xml = $xml->mapi;
     $this->_xml = $xml;
     //The value of the MD5 is calculated for the information following the tag </md5content> and preceding the tag </mapi>.
     preg_match("/<\\/md5content>(.*)<\\/mapi>/im", $str, $matches);
     $this->_hash = md5($matches[1]);
     if (!$this->_xml) {
         throw new Am_Exception_Paysystem_TransactionInvalid('Invalid xml received from Hipay: ' . $str);
     }
     /*
             <?xml version="1.0" encoding="UTF-8"?>
             <mapi>
        <mapiversion>1.0</mapiversion>
        <md5content>c0783cc613bf025087b8bf5edecac824</md5content>
        <result>
            <operation>capture</operation>
            <status>ok</status>
            <date>2010-02-23</date>
            <time>10:32:12 UTC+0000</time>
            <transid>4B83AEA905C49</transid>
            <subscriptionId>753EA685B55651DC40F0C2784D5E1170</subscriptionId> (if the
            transaction is attached to a subscription)
            <origAmount>10.20</origAmount>
            <origCurrency>EUR</origCurrency>
            <idForMerchant>REF6522</idForMerchant>
            <emailClient>email_client@hipay.com</emailClient>
            <merchantDatas>
                <_aKey_id_client>2000</_aKey_id_client>
                <_aKey_credit>10</_aKey_credit>
            </merchantDatas>
            <refProduct0>REF6522</refProduct0>
        </result>
             </mapi>
     */
 }
예제 #7
0
 public function processValidated()
 {
     parent::processValidated();
     if ($this->request->get('RebillAnchor')) {
         $this->invoice->data()->set(Am_Paysystem_Payonlinesystem::REBILL_ANCHOR, $this->request->get('RebillAnchor'))->update();
     }
 }
예제 #8
0
 public function processValidated()
 {
     parent::processValidated();
     echo "REDIRECT=" . $this->plugin->getRootUrl() . "/thanks?id=" . $this->invoice->getSecureId("THANKS");
 }
예제 #9
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     $this->invoice = Am_Di::getInstance()->invoiceTable->findFirstBy(array('public_id' => $request->get('reference_id')));
 }
예제 #10
0
파일: dotpay.php 프로젝트: grlf/eyedock
 public function processValidated()
 {
     parent::processValidated();
     echo "OK";
 }
예제 #11
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $this->tracking_params = $request->get("tracking_params");
     $this->billing_address = $request->get("billing_address");
     $this->subscription = $request->get("subscription");
     parent::__construct($plugin, $request, $response, $invokeArgs);
 }
예제 #12
0
 public function process()
 {
     $vars = $this->request->getPost();
     if (($sign = $this->plugin->getConfig('signature')) && !isset($vars["WMI_SIGNATURE"])) {
         $this->printAnswer("Retry", "Parameter WMI_SIGNATURE is absent.");
         return;
     }
     if (!isset($vars["WMI_PAYMENT_NO"])) {
         $this->printAnswer("Retry", "Parameter WMI_PAYMENT_NO is absent.");
         return;
     }
     if (!isset($vars["WMI_ORDER_STATE"])) {
         $this->printAnswer("Retry", "Parameter WMI_ORDER_STATE is absent.");
         return;
     }
     $params = array();
     foreach ($vars as $key => $value) {
         if ($key !== "WMI_SIGNATURE") {
             $params[$key] = $value;
         }
     }
     ksort($params, SORT_STRING);
     $values = "";
     foreach ($params as $value) {
         $values .= $value;
     }
     $signature = base64_encode(pack("H*", $sign($values . $this->plugin->getConfig('key'))));
     if ($signature != $vars["WMI_SIGNATURE"]) {
         $this->printAnswer("Retry", "Wrong digital signature " . $vars["WMI_SIGNATURE"]);
         return;
     }
     if (strtoupper($this->request->get("WMI_ORDER_STATE")) != "ACCEPTED") {
         $this->printAnswer("Retry", "Unknown order status " . $vars["WMI_ORDER_STATE"]);
         return;
     }
     parent::process();
     $this->printAnswer("Ok", "Order #" . $this->request->get("WMI_PAYMENT_NO") . " is paid!");
 }
예제 #13
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     //        $s = base64_decode(str_replace(" ", "+", $request->get("Crypt",$request->get("crypt"))));
     //        $s = $plugin->sagepay_simple_xor($s, $plugin->getConfig('pass'));
     $s = Am_Paysystem_SagepayForm::decryptAes($request->get("Crypt", $request->get("crypt")), $plugin->getConfig('pass'));
     parse_str($s, $this->vars);
 }
예제 #14
0
 function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
 }
예제 #15
0
 function processValidated()
 {
     parent::processValidated();
     print "OK" . $this->invoice->invoice_id;
 }
예제 #16
0
 public function processValidated()
 {
     if ($this->vars['action'] == 'mp_confirm_password') {
         parent::processValidated();
         if (!$this->invoice->comment && ($n = $this->request->get('number')) && ($p = $this->request->get('passwd'))) {
             $this->invoice->updateQuick('comment', "SMS num/pass: {$n}/{$p}");
         }
     }
 }
예제 #17
0
 function setInvoiceLog(InvoiceLog $log)
 {
     parent::setInvoiceLog($log);
     $this->getPlugin()->logOther('SAFECART IPN:', $this->req);
 }
예제 #18
0
 public function processValidated()
 {
     if (!$this->invoice) {
         return;
     }
     parent::processValidated();
 }
예제 #19
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     $this->xml = simplexml_load_string($request->getRawBody());
 }
예제 #20
0
파일: ideal.php 프로젝트: grlf/eyedock
 function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     $this->_params = $this->request->isPost() ? $this->request->getPost() : $this->request->getQuery();
 }
예제 #21
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $this->vercode = split(":", $request->get('vercode'));
     parent::__construct($plugin, $request, $response, $invokeArgs);
 }
예제 #22
0
 function setInvoiceLog(InvoiceLog $log)
 {
     parent::setInvoiceLog($log);
     $this->getPlugin()->logOther('1SC API NOTIFICATION', $this->_xml);
     $this->getPlugin()->logOther('1SC ORDER', $this->_order->asXML());
     $this->getPlugin()->logOther('1SC CLIENT', $this->_client->asXML());
 }
예제 #23
0
파일: paymento.php 프로젝트: grlf/eyedock
 public function process()
 {
     $this->result = $this->request->getPost();
     parent::process();
 }
예제 #24
0
 public function process()
 {
     $vars = $this->request->getPost();
     $vars['CustomerID'] = $this->plugin->getConfig('CustomerID');
     $vars['UserName'] = $this->plugin->getConfig('UserName');
     $r = new Am_HttpRequest($this->getUrl() . '?' . http_build_query($vars, '', '&'));
     $response = $r->send()->getBody();
     if (!$response) {
         throw new Am_Exception_Paysystem('Got empty response from API server');
     }
     $xml = simplexml_load_string($response);
     if (!$xml) {
         throw new Am_Exception_Paysystem('Got error from API: response is not xml');
     }
     $this->xml_result = $xml;
     parent::process();
 }
예제 #25
0
 public function processValidated()
 {
     parent::processValidated();
     switch ($this->request->getParam($type)) {
         case '0':
             $this->invoice->addPayment($this);
             break;
         case '2':
             $this->invoice->addRefund($this, $this->request->get('ref'));
             break;
     }
 }
예제 #26
0
 function processValidated()
 {
     parent::processValidated();
     print $this->getPlugin()->getConfig('message', 'Thanks for your payment!');
 }
예제 #27
0
 public function processValidated()
 {
     if ($this->request->get('status') == 'closed') {
         $this->invoice->setCancelled();
     } else {
         $user = $this->invoice->getUser();
         $user->data()->set(Am_Paysystem_TargetpayWap::INVOICE_TRANSACTION_ID, $this->request->get('trxid'))->update();
         parent::processValidated();
     }
 }
예제 #28
0
 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $this->msp = $plugin->createMSP();
     $this->msp->transaction['id'] = $request->get('transactionid');
     parent::__construct($plugin, $request, $response, $invokeArgs);
 }
예제 #29
0
 function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     parent::__construct($plugin, $request, $response, $invokeArgs);
     $this->c = new Am_Controller($request, $response, $invokeArgs);
     $PathInfo = $request->getPathInfo();
     $this->_case = substr($PathInfo, strrpos($PathInfo, '/') + 1);
     $this->_params = $this->request->isPost() ? $this->request->getPost() : $this->request->getQuery();
     $receipt_id = '';
     $invoice = $this->getInvoice();
     //Am_Di::getInstance()->invoiceTable->findFirstByPublicId($payment_id);
     if ($invoice) {
         $receipt_id = Am_Di::getInstance()->invoicePaymentTable->getLastReceiptId($invoice->invoice_id);
     }
     if ($receipt_id) {
         $this->_params['transaction_id'] = $receipt_id;
     }
 }
예제 #30
0
 public function processValidated()
 {
     if ($rbAccId = $this->request->get('rbAccountId')) {
         $this->invoice->data()->set(Am_Paysystem_BeanstreamRemote::RB_ACCOUNT_ID_KEY, $rbAccId)->update();
     }
     parent::processValidated();
 }