当前位置: 首页>>代码示例>>PHP>>正文


PHP Payment::delete方法代码示例

本文整理汇总了PHP中Payment::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::delete方法的具体用法?PHP Payment::delete怎么用?PHP Payment::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Payment的用法示例。


在下文中一共展示了Payment::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: storePayments

 /**
  * Stores the Payments as present in the POST request
  *
  * See {@see Payment::delete()},
  * {@see Payment::add()}, and
  * {@see Payment::update()}.
  */
 static function storePayments()
 {
     $result = NULL;
     if (isset($_GET['delete_payment'])) {
         $payment_id = intval($_GET['delete_payment']);
         $result = Payment::delete($payment_id);
     }
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after Payment::delete: ".self::$success.", changed: ".self::$changed);
     $result = Payment::add();
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after Payment::add: ".self::$success.", changed: ".self::$changed);
     $result = Payment::update();
     if (isset($result)) {
         self::$changed = true;
         self::$success &= $result;
     }
     //DBG::log("after Payment::update: ".self::$success.", changed: ".self::$changed);
     Payment::reset();
     if (empty($_POST['bpayment'])) {
         return;
     }
     // NOTE: All the following could be handled by Payment::settings()
     \Cx\Core\Setting\Controller\Setting::set('payrexx_instance_name', trim(strip_tags(contrexx_input2raw($_POST['payrexx_instance_name']))));
     \Cx\Core\Setting\Controller\Setting::set('payrexx_api_secret', trim(strip_tags(contrexx_input2raw($_POST['payrexx_api_secret']))));
     \Cx\Core\Setting\Controller\Setting::set('payrexx_active', !empty($_POST['payrexx_active']));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_shop_id', trim(strip_tags(contrexx_input2raw($_POST['postfinance_shop_id']))));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_active', !empty($_POST['postfinance_active']));
     //        \Cx\Core\Setting\Controller\Setting::set('postfinance_hash_seed',
     //            trim(strip_tags(contrexx_input2raw($_POST['postfinance_hash_seed']);
     // Replaced by
     \Cx\Core\Setting\Controller\Setting::set('postfinance_hash_signature_in', trim(strip_tags(contrexx_input2raw($_POST['postfinance_hash_signature_in']))));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_hash_signature_out', trim(strip_tags(contrexx_input2raw($_POST['postfinance_hash_signature_out']))));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_authorization_type', trim(strip_tags(contrexx_input2raw($_POST['postfinance_authorization_type']))));
     // OBSOLETE -- Determined by the available cards and the PostFinance
     // backend settings
     //        \Cx\Core\Setting\Controller\Setting::set('postfinance_accepted_payment_methods', $strYellowpayAcceptedPM);
     \Cx\Core\Setting\Controller\Setting::set('postfinance_use_testserver', !empty($_POST['postfinance_use_testserver']));
     // Postfinance Mobile
     \Cx\Core\Setting\Controller\Setting::set('postfinance_mobile_webuser', trim(strip_tags(contrexx_input2raw($_POST['postfinance_mobile_webuser']))));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_mobile_sign', trim(strip_tags(contrexx_input2raw($_POST['postfinance_mobile_sign']))));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_mobile_ijustwanttotest', !empty($_POST['postfinance_mobile_ijustwanttotest']));
     \Cx\Core\Setting\Controller\Setting::set('postfinance_mobile_status', !empty($_POST['postfinance_mobile_status']));
     // Saferpay
     \Cx\Core\Setting\Controller\Setting::set('saferpay_id', trim(strip_tags(contrexx_input2raw($_POST['saferpay_id']))));
     \Cx\Core\Setting\Controller\Setting::set('saferpay_active', !empty($_POST['saferpay_active']));
     \Cx\Core\Setting\Controller\Setting::set('saferpay_finalize_payment', !empty($_POST['saferpay_finalize_payment']));
     \Cx\Core\Setting\Controller\Setting::set('saferpay_use_test_account', !empty($_POST['saferpay_use_test_account']));
     \Cx\Core\Setting\Controller\Setting::set('saferpay_window_option', intval($_POST['saferpay_window_option']));
     // Paypal
     \Cx\Core\Setting\Controller\Setting::set('paypal_account_email', trim(strip_tags(contrexx_input2raw($_POST['paypal_account_email']))));
     \Cx\Core\Setting\Controller\Setting::set('paypal_active', !empty($_POST['paypal_active']));
     \Cx\Core\Setting\Controller\Setting::set('paypal_default_currency', trim(strip_tags(contrexx_input2raw($_POST['paypal_default_currency']))));
     // Datatrans
     \Cx\Core\Setting\Controller\Setting::set('datatrans_merchant_id', trim(strip_tags(contrexx_input2raw($_POST['datatrans_merchant_id']))));
     \Cx\Core\Setting\Controller\Setting::set('datatrans_active', !empty($_POST['datatrans_active']));
     \Cx\Core\Setting\Controller\Setting::set('datatrans_request_type', trim(strip_tags(contrexx_input2raw($_POST['datatrans_request_type']))));
     \Cx\Core\Setting\Controller\Setting::set('datatrans_use_testserver', !empty($_POST['datatrans_use_testserver']));
     // Paymill
     \Cx\Core\Setting\Controller\Setting::set('paymill_active', !empty($_POST['paymill_active']));
     \Cx\Core\Setting\Controller\Setting::set('paymill_use_test_account', !empty($_POST['paymill_use_test_account']));
     \Cx\Core\Setting\Controller\Setting::set('paymill_test_private_key', trim(strip_tags(contrexx_input2raw($_POST['paymill_test_private_key']))));
     \Cx\Core\Setting\Controller\Setting::set('paymill_test_public_key', trim(strip_tags(contrexx_input2raw($_POST['paymill_test_public_key']))));
     \Cx\Core\Setting\Controller\Setting::set('paymill_live_private_key', trim(strip_tags(contrexx_input2raw($_POST['paymill_live_private_key']))));
     \Cx\Core\Setting\Controller\Setting::set('paymill_live_public_key', trim(strip_tags(contrexx_input2raw($_POST['paymill_live_public_key']))));
     // LSV
     \Cx\Core\Setting\Controller\Setting::set('payment_lsv_active', !empty($_POST['payment_lsv_active']));
     // All preceding should be handled by Payment::settings()
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:82,代码来源:ShopSettings.class.php

示例2: testPaymentDelete

 /**
  * @expectedException         Everypay\Exception\RuntimeException
  * @expectedExceptionMessage  Resource Payments does not support method Everypay\Payment::delete
  */
 public function testPaymentDelete()
 {
     $token = 'pmt_4KQ2DD15gs2w8RS4M2MhBz1Q';
     $payment = Payment::delete($token);
 }
开发者ID:everypay,项目名称:everypay_prestashop_1_6_x,代码行数:9,代码来源:PaymentTest.php

示例3: testPaymentDelete

 /**
  * @expectedException         Everypay\Exception\RuntimeException
  * @expectedExceptionMessage  Resource Payments does not support method Everypay\Payment::delete
  * @group                     ecommerce
  * @group                     3dsecure
  */
 public function testPaymentDelete()
 {
     //applicable both in local and remote mode
     $token = 'pmt_4KQ2DD15gs2w8RS4M2MhBz1Q';
     $payment = Payment::delete($token);
 }
开发者ID:everypay,项目名称:everypay-php,代码行数:12,代码来源:PaymentTest.php

示例4: showPayment

function showPayment()
{
    global $connector;
    $student = new Student();
    $student->setConnector($connector);
    $payment = new Payment();
    $payment->setConnector($connector);
    if (isset($_POST['operation'])) {
        list($operation, $params) = explode("#", $_POST['operation']);
        switch ($operation) {
            case 'selectStudent':
                $result['edit'] = $payment->getById($params);
                if (!isset($result['edit']->student_id)) {
                    $result['edit']->student_id = $params;
                }
                break;
            case 'delete':
                $error_msg = $payment->delete($params);
                break;
            case 'edit':
                $result['edit'] = $payment->getById($params);
                break;
            case 'editChanges':
                $payment->storeFormValues($_POST);
                $error_msg = $payment->update();
                break;
            case 'saveChanges':
                $payment->storeFormValues($_POST);
                $payment->setConnector($connector);
                $error_msg = $payment->insert();
                break;
            default:
                $error_msg = "Operazione non valida";
        }
        if ($error_msg != "") {
            $result["errorMessage"] = $error_msg;
        } elseif ($operation != 'edit' && $operation != 'selectStudent') {
            $result["statusMessage"] = "Operazione completata!";
        }
    }
    $result['students'] = $student->getList("cognome");
    $result['payments'] = $payment->getList();
    $page = "payment.php";
    include_once BASE_PATH . "template.php";
}
开发者ID:christian-rizza,项目名称:sis-portal,代码行数:45,代码来源:index.php


注:本文中的Payment::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。