Пример #1
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $client = new SoapClient(self::WSDL);
     $invoice = $payment->getInvoice();
     $user = $invoice->getUser();
     $data = array('paccount_id' => $this->getConfig('paccount_id'), 'type' => 'REFUND', 'transaction_ip' => $user->last_ip, 'amount_cnts' => 100 * $amount, 'client_reference' => $invoice->public_id, 'client_customer_id' => $user->pk(), 'affiliate_id' => 0, 'site_url' => $this->getDi()->config->get('site_url'), 'member_login' => $user->login, 'support_url' => $this->getDi()->config->get('site_url'), 'support_tel' => 'N/A', 'support_email' => $this->getDi()->config->get('admin_email'), 'customer_lang' => 'en', 'customer_useragent' => $user->last_user_agent, 'billing_invoicing_id' => 0, 'billing_description' => $invoice->getLineDescription(), 'billing_preauth_duration' => 0, 'billing_rebill_period' => 0, 'billing_rebill_duration' => 0, 'billing_rebill_price_cnts' => 100 * $invoice->second_total, 'billing_initial_transaction_id' => $payment->receipt_id);
     $param = array($this->getConfig('apiKey'), $user->data()->get(self::COMENPAY_CARD_TOKEN), $user->data()->get(self::COMENPAY_CARD_KEY), $data);
     $request = new SoapRequestWrapperComenpay($client, 'Transaction', $param);
     $t = new Am_Paysystem_Transaction_CreditCard_Comenpay_Transaction_Refund($this, $invoice, $request, $payment->receipt_id, $amount);
     $t->run($result);
 }
 /**
  * Remove existing payment
  *
  * @param void
  * @return null
  */
 function delete()
 {
     if ($this->active_invoice->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if ($this->active_invoice_payment->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if (!$this->active_invoice_payment->canDelete($this->logged_user)) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     if ($this->request->isSubmitted()) {
         $delete = $this->active_invoice_payment->delete();
         if ($delete && !is_error($delete)) {
             flash_success('Payment has been successfully deleted');
         } else {
             flash_error('Failed to delete selected payment');
         }
         // if
         $this->redirectToUrl($this->active_invoice->getViewUrl());
     } else {
         $this->httpError(HTTP_ERR_BAD_REQUEST);
     }
     // if
 }
Пример #3
0
 function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $this->invoice = $payment->getInvoice();
     $params = array('key' => $this->getConfig('key'), 'ref' => $payment->receipt_id, 'uid' => $payment->user_id, 'type' => 1);
     $params['sign'] = $this->calculateSignature($params, $this->getConfig('secret'));
     $requst = new Am_HttpRequest(self::URL_TICKET, Am_HttpRequest::METHOD_POST);
     $requst->addPostParameter($params);
     $log = $this->logRequest($requst);
     $responce = $requst->send();
     $log->add($responce);
     if ($responce->getStatus() != 200) {
         $result->setFailed('Incorrect HTTP response status: ' . $responce->getStatus());
         return;
     }
     $res = Am_Controller::decodeJson($responce->getBody());
     if ($res['result'] == 1) {
         $trans = new Am_Paysystem_Transaction_Manual($this);
         $trans->setAmount($amount);
         $trans->setReceiptId($payment->receipt_id);
         $result->setSuccess($trans);
         return;
     }
     $result->setFailed($res['errors']);
 }
Пример #4
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $transaction = new Am_Paysystem_Transaction_Ewayrapid3_Refund($this, $payment->getInvoice(), $payment->transaction_id, $amount);
     $transaction->run($result);
 }
Пример #5
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $isVoid = $payment->amount == $amount;
     if ($isVoid) {
         $request = $this->createHttpRequest();
         $request->addPostParameter('x_Type', 'VOID');
         $request->addPostParameter('x_Trans_Id', $payment->transaction_id);
         $request = $this->_sendRequest($request);
         $transaction = new Am_Paysystem_Transaction_AuthorizeAim_Refund($this, $payment->getInvoice(), $request, $payment->transaction_id);
         $transaction->run($result);
     }
     if (!$isVoid || $result->isFailure()) {
         // Transaction is settled already, attempt to run CREDIT
         $ccRecord = $this->getDi()->getInstance()->CcRecordTable->findFirstBy(array('user_id' => $payment->getUser()->pk()));
         if (!$ccRecord) {
             $result->setFailed('User does not have cc record on file');
             return;
         }
         $result->reset();
         $cc = str_replace('*', '', $ccRecord->cc);
         $request = $this->createHttpRequest();
         $request->addPostParameter('x_Type', 'CREDIT');
         $request->addPostParameter('x_Trans_Id', $payment->transaction_id);
         $request->addPostParameter('x_card_num', $cc);
         $request->addPostParameter('x_Amount', $amount);
         $request = $this->_sendRequest($request);
         $transaction = new Am_Paysystem_Transaction_AuthorizeAim_Refund($this, $payment->getInvoice(), $request, $payment->transaction_id);
         $transaction->run($result);
     }
 }
Пример #6
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $this->getTicketSession();
     $transaction = new Am_Paysystem_Transaction_CreditCard_Intuit_Refund($this, $payment->getInvoice(), $amount);
     $transaction->run($result);
 }
Пример #7
0
 public function __construct(Am_Paysystem_Abstract $plugin, InvoicePayment $payment, $amount)
 {
     $this->plugin = $plugin;
     $this->user = $payment->getUser();
     $this->invoice = $payment->getInvoice();
     $this->request = new Am_HttpRequest(Am_Paysystem_PaymillDd::API_ENDPOINT . 'refunds/' . $payment->receipt_id, Am_HttpRequest::METHOD_POST);
     $this->request->setAuth($this->plugin->getConfig('private_key'), '');
     $this->request->addPostParameter(array('amount' => ($amount ? $amount : $payment->amount) * 100));
 }
Пример #8
0
 function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $request = new Am_HttpRequest("https://" . $this->getConfig('login') . ":" . $this->getConfig('password') . "@payment.architrade.com/cgi-adm/refund.cgi");
     $invoice = $payment->getInvoice();
     $currency = $this->getCurrencyCode($invoice);
     $post_params = new stdclass();
     $post_params->merchant = $this->getConfig('merchant');
     $post_params->amount = $amount * 100;
     $count = $this->getDi()->db->selectCol("SELECT COUNT(*) FROM ?_invoice_payment\n                WHERE invoice_id=?d AND dattm < ?\n                ", $payment->invoice_id, $payment->dattm);
     $post_params->orderId = $invoice->public_id . "-" . sprintf("%03d", array_shift($count));
     $post_params->transact = $invoice->data()->get(self::TICKET);
     $post_params->textreply = 'true';
     $post_params->currency = $currency;
     $post_params->md5key = md5($s2 = $this->getConfig('key2') . md5($s1 = $this->getConfig('key1') . "merchant=" . $this->getConfig('merchant') . "&orderid=" . $invoice->public_id . "&transact=" . $invoice->data()->get(self::TICKET) . "&amount=" . $amount));
     $request->addPostParameter((array) $post_params);
     $response = $request->send();
     $response = $this->parseResponse($response->getBody());
     if ($response['result'] === 0) {
         $trans = new Am_Paysystem_Transaction_Manual($this);
         $trans->setAmount($amount);
         $trans->setReceiptId($payment->receipt_id . '-dibs-refund');
         $result->setSuccess($trans);
     } else {
         $result->setFailed(array('Error Processing Refund!'));
     }
 }
Пример #9
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $dpsBillingId = $payment->getInvoice()->data()->get(self::DPS_BILLING_ID);
     if (!$dpsBillingId) {
         return $result->setFailed(array("No saved DPS_BILLING_ID for invoice"));
     }
     $transaction = new Am_Paysystem_Transaction_CreditCard_PaymentExpress_Refund($this, $payment->getInvoice(), $dpsBillingId, $amount);
     $transaction->run($result);
 }
Пример #10
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $customerVaultId = $this->getDi()->userTable->load($payment->user_id)->data()->get($this->getCustomerVaultVariable());
     $tr = new Am_Paysystem_Networkmerchants_Transaction_Refund($this, $payment->getInvoice(), $payment->receipt_id, $amount, $customerVaultId);
     $tr->run($result);
 }
 protected function gridPaymentColumn($data, $row)
 {
     $criteria = new CDbCriteria();
     $criteria->select = 'SUM(amount_paid) as amount_paid';
     $criteria->condition = 'invoice_id= :invoiceId';
     $criteria->params = array(':invoiceId' => $data->id);
     $invoice_payment = InvoicePayment::model()->find($criteria);
     print_r(Yii::app()->numberFormatter->formatDecimal($invoice_payment->amount_paid));
 }
Пример #12
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $request = $this->createHttpRequest();
     $ps = new stdclass();
     $ps->type = 'rfnd';
     $ps->reason = 'ticket.type.refund.8';
     $ps->comment = 'refund request for aMember user (' . $payment->getUser()->login . ')';
     if (doubleval($amount) == doubleval($payment->amount)) {
         $ps->refundType = 'FULL';
     } else {
         $ps->refundType = 'PARTIAL_AMOUNT';
         $ps->refundAmount = $amount;
     }
     $get_params = http_build_query((array) $ps, '', '&');
     $request->setUrl($s = 'https://api.clickbank.com/rest/1.3/tickets/' . $payment->receipt_id . "?{$get_params}");
     $request->setHeader(array('Content-Length' => '0', 'Accept' => 'application/xml', 'Authorization' => $this->getConfig('dev_key') . ':' . $this->getConfig('clerk_key')));
     $request->setMethod(Am_HttpRequest::METHOD_POST);
     $this->logRequest($request);
     $request->setMethod('POST');
     $response = $request->send();
     $this->logResponse($response);
     if ($response->getStatus() != 200 && $response->getBody() != 'Refund ticket already open') {
         throw new Am_Exception_InputError("An error occurred during refund request");
     }
     $trans = new Am_Paysystem_Transaction_Manual($this);
     $trans->setAmount($amount);
     $trans->setReceiptId($payment->receipt_id . '-clickbank-refund');
     $result->setSuccess($trans);
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = InvoicePayment::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Пример #14
0
 public function cancelInvoice(InvoicePayment $payment, Am_Paysystem_Result $result)
 {
     $log = $this->getDi()->invoiceLogRecord;
     $log->setInvoice($payment->getInvoice());
     try {
         $cl = @new SoapClient("http://vas.mikro-odeme.com/services/MSubscriberManagementService.asmx?wsdl");
         $res = $cl->DeactivateSubscriber(array('token' => array('UserCode' => $this->getConfig('user_code'), 'Pin' => $this->getConfig('pin')), 'subscriberId' => $payment->getInvoice()->data()->get('mo_subscriber')));
     } catch (Exception $e) {
         throw new Am_Exception_InputError('Unable to contact payment server:' . $e->getMessage());
     }
     if ($res->DeactivateSubscriberResult->StatusCode > 0) {
         throw new Am_Exception_InputError("Error in data format: " . $res->DeactivateSubscriberResult->ErrorMessage);
     }
 }
Пример #15
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $request = $this->_sendRequest($this->createHttpRequest());
     $request->addPostParameter('x_Type', 'CREDIT');
     $request->addPostParameter('x_Trans_Id', $this->getConfig('test_mode') ? 0 : $payment->transaction_id);
     $request->addPostParameter('x_Amount', $amount);
     $echeck = $this->loadEcheck($payment->getInvoice());
     $request->addPostParameter('x_bank_acct_num', $echeck->echeck_ban);
     $request->addPostParameter('x_bank_aba_code', $echeck->echeck_aba);
     $request->addPostParameter('x_bank_acct_type', $echeck->echeck_type);
     $request->addPostParameter('x_bank_name', $echeck->check_bank_name);
     $request->addPostParameter('x_bank_acct_name', $echeck->echeck_account_name);
     $request->addPostParameter('x_echeck_type', $echeck->echeck_type == self::TYPE_BUSINESSCHECKING ? 'CCD' : 'PPD');
     $transaction = new Am_Paysystem_Transaction_AuthorizeEcheck_Refund($this, $payment->getInvoice(), $request, $payment->transaction_id, $amount);
     $transaction->run($result);
 }
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $customerVaultId = $this->getDi()->userTable->load($payment->user_id)->data()->get(self::CUSTOMER_VAULT_ID);
     $tr = new Am_Paysystem_Paymentsystemsworldwide_Transaction_Refund($this, $payment->getInvoice(), $payment->receipt_id, $amount, $customerVaultId);
     $tr->run($result);
 }
Пример #17
0
 /**
  * Process invoice and insert necessary commissions for it
  *
  * External code should guarantee that this method with $payment = null will be called
  * only once for each user for First user invoice
  */
 public function processPayment(Invoice $invoice, InvoicePayment $payment = null)
 {
     $aff_id = $invoice->aff_id;
     /* @var $coupon Coupon */
     try {
         if (!$aff_id && ($coupon = $invoice->getCoupon())) {
             // try to find affiliate by coupon
             $aff_id = $coupon->aff_id ? $coupon->aff_id : $coupon->getBatch()->aff_id;
         }
     } catch (Am_Exception_Db_NotFound $e) {
         //coupon not found
     }
     if (empty($aff_id)) {
         $aff_id = $invoice->getUser()->aff_id;
     }
     if ($aff_id && empty($invoice->aff_id)) {
         // set aff_id to invoice for quick access next time
         $invoice->updateQuick('aff_id', $aff_id);
     }
     // run event to get plugins chance choose another affiliate
     $event = new Am_Event(Bootstrap_Aff::AFF_FIND_AFFILIATE, array('invoice' => $invoice, 'payment' => $payment));
     $event->setReturn($aff_id);
     $this->getDi()->hook->call($event);
     $aff_id = $event->getReturn();
     if (empty($aff_id)) {
         return;
     }
     // no affiliate id registered
     if ($aff_id == $invoice->getUser()->pk()) {
         return;
     }
     //strange situation
     // load affiliate and continue
     $aff = $this->getDi()->userTable->load($aff_id, false);
     if (!$aff || !$aff->is_affiliate) {
         return;
     }
     // affiliate not found
     $user = $invoice->getUser();
     if (!$user->aff_id) {
         $user->aff_id = $aff->pk();
         $user->aff_added = sqlTime('now');
         $user->data()->set('aff-source', 'invoice-' . $invoice->pk());
         $user->save();
     }
     // try to load other tier affiliate
     $aff_tier = $aff;
     $aff_tiers = array();
     $aff_tiers_exists = array($aff->pk());
     for ($tier = 1; $tier <= $this->getMaxTier(); $tier++) {
         if (!$aff_tier->aff_id || $aff_tier->pk() == $invoice->getUser()->pk()) {
             break;
         }
         $aff_tier = $this->getDi()->userTable->load($aff_tier->aff_id, false);
         if (!$aff_tier || !$aff_tier->is_affiliate || $aff_tier->pk() == $invoice->getUser()->pk() || in_array($aff_tier->pk(), $aff_tiers_exists)) {
             //already in chain
             break;
         }
         $aff_tiers[$tier] = $aff_tier;
         $aff_tiers_exists[] = $aff_tier->pk();
     }
     $isFirst = !$payment || $payment->isFirst();
     //to define price field
     $paymentNumber = is_null($payment) ? 0 : $invoice->getPaymentsCount();
     if (!$payment) {
         $tax = 0;
     } else {
         $tax = $this->getDi()->config->get('aff.commission_include_tax', false) ? 0 : doubleval($payment->tax);
     }
     $amount = $payment ? $payment->amount - $tax : 0;
     $date = $payment ? $payment->dattm : 'now';
     // now calculate commissions
     $items = is_null($payment) ? array_slice($invoice->getItems(), 0, 1) : $invoice->getItems();
     foreach ($items as $item) {
         //we do not calculate commission for free items in invoice
         $prefix = $isFirst ? 'first' : 'second';
         if (!is_null($payment) && !(double) $item->get("{$prefix}_total")) {
             continue;
         }
         $comm = $this->getDi()->affCommissionRecord;
         $comm->date = sqlDate($date);
         $comm->record_type = AffCommission::COMMISSION;
         $comm->invoice_id = $invoice->invoice_id;
         $comm->invoice_item_id = $item->invoice_item_id;
         $comm->invoice_payment_id = $payment ? $payment->pk() : null;
         $comm->receipt_id = $payment ? $payment->receipt_id : null;
         $comm->product_id = $item->item_id;
         $comm->is_first = $paymentNumber <= 1;
         $comm->_setPayment($payment);
         $comm->_setInvoice($invoice);
         $comm_tier = clone $comm;
         $rules = array();
         $topay_this = $topay = $this->calculate($invoice, $item, $aff, $paymentNumber, 0, $amount, $date, $rules);
         if ($topay > 0) {
             $comm->aff_id = $aff->pk();
             $comm->amount = $topay;
             $comm->tier = 0;
             $comm->_setAff($aff);
             $comm->insert();
             $comm->setCommissionRules(array_map(create_function('$el', 'return $el->pk();'), $rules));
         }
         foreach ($aff_tiers as $tier => $aff_tier) {
             $rules = array();
             $topay_this = $this->calculate($invoice, $item, $aff_tier, $paymentNumber, $tier, $topay_this, $date, $rules);
             if ($topay_this > 0) {
                 $comm_this = clone $comm_tier;
                 $comm_this->aff_id = $aff_tier->pk();
                 $comm_this->amount = $topay_this;
                 $comm_this->tier = $tier;
                 $comm_this->_setAff($aff_tier);
                 $comm_this->insert();
                 $comm_this->setCommissionRules(array_map(create_function('$el', 'return $el->pk();'), $rules));
             }
         }
     }
 }
 /**
  * Process invoice and insert necessary commissions for it
  */
 public function processPayment(Invoice $invoice, InvoicePayment $payment)
 {
     $user = $invoice->getUser();
     if (empty($user->aff_id)) {
         return;
     }
     // no affiliate id registered
     $aff = $this->getDi()->userTable->load($user->aff_id, false);
     if (!$aff || !$aff->is_affiliate) {
         return;
     }
     // affiliate not found
     // try to load second tier affiliate
     if ($aff->aff_id) {
         $aff2 = $this->getDi()->userTable->load($aff->aff_id, false);
     } else {
         $aff2 = null;
     }
     $isFirst = !$payment || $payment->isFirst();
     $amount = $payment ? $payment->amount : 0;
     $date = $payment ? $payment->dattm : 'now';
     // now calculate commissions
     foreach ($invoice->getItems() as $item) {
         $comm = $this->getDi()->affCommissionRecord;
         $comm->date = sqlDate($date);
         $comm->record_type = AffCommission::COMMISSION;
         $comm->invoice_id = $invoice->invoice_id;
         $comm->invoice_payment_id = $payment ? $payment->pk() : null;
         $comm->receipt_id = $payment ? $payment->receipt_id : null;
         $comm->product_id = $item->item_id;
         $comm->is_first = $isFirst;
         $comm->_setPayment($payment);
         $comm->_setInvoice($invoice);
         $comm2 = clone $comm;
         $topay = $this->calculate($invoice, $item, $aff, $isFirst ? 0 : 1, 0, $amount, $date);
         if ($topay) {
             $comm->aff_id = $aff->pk();
             $comm->amount = $topay;
             $comm->tier = 0;
             $comm->_setAff($aff);
             $comm->insert();
         }
         if ($aff2) {
             $topay2 = $this->calculate($invoice, $item, $aff, $isFirst ? 0 : 1, 1, $topay, $date);
             if ($topay2) {
                 $comm2->aff_id = $aff2->pk();
                 $comm2->amount = $topay2;
                 $comm2->tier = 1;
                 $comm->_setAff($aff2);
                 $comm2->insert();
             }
         }
     }
 }
Пример #19
0
 function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $trans = new Am_Paysystem_Transaction_AuthorizeCim_CreateCustomerProfileTransactionRefund($this, $payment->getInvoice(), $payment, $amount);
     $trans->run($result);
 }
Пример #20
0
echo $requiredFields;
?>
','&action=insert&form=frmInvoice','frmInvoice')">
<fieldset id="customer">
<legend>Customer</legend>
<?php 
echo frmElements($fsCustomer);
?>
</fieldset>
<fieldset id="summary">
<legend>Summary</legend>
<?php 
echo frmElements($fsInvoice);
?>
</fieldset>
<?php 
$lineItem = new LineItem();
$lineItem->build();
$payment = new InvoicePayment();
$payment->build();
?>
 
</form>
<script type="text/javascript">
<?php 
echo $icoCollapse;
?>
$("#oOptions").append(icoCollapse);
collapseTabs();
</script>
Пример #21
0
 function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $r = new Am_HttpRequest(self::URL, Am_HttpRequest::METHOD_POST);
     $r->addPostParameter('userkey', $this->getConfig('api_key'));
     $r->addPostParameter('type', self::REFUND);
     $r->addPostParameter('version', '2.6');
     $r->addPostParameter('transid', $payment->transaction_id);
     $r->addPostParameter('merchantMID', $this->getPlugin()->getConfig('mid', 1));
     $tr = new Am_Paysystem_Transaction_Altcharge_Refund($this, $payment->getInvoice(), $r, $doFirst, $payment->transaction_id);
     $tr->run($result);
 }
Пример #22
0
 function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $trans = new Am_Paysystem_Transaction_WepayOnsite_Checkout_Refund($this, $payment->getInvoice(), $payment->receipt_id, $amount);
     $trans->run($result);
 }
Пример #23
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     if (!$this->getApi()) {
         throw new Am_Exception_Paysystem_NotConfigured("No 2Checkout API username/password configured - could not do refund");
     }
     $log = $this->getDi()->invoiceLogRecord;
     $log->setInvoice($payment->getInvoice());
     $return = $this->getApi()->refundInvoice($payment->receipt_id, 5, "Customer Request");
     $log->add($return);
     if ($return['response_code'] == 'OK') {
         $result->setSuccess();
     } else {
         $result->setFailed($return['response_message']);
     }
 }
Пример #24
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $trans = new Am_Paysystem_Transaction_CreditCard_Braintree_Refund($this, $payment->getInvoice(), null, null, $payment);
     $trans->run($result);
     return $result;
 }
Пример #25
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $transaction = new Am_Paysystem_Transaction_CcDemo_Refund($this, $payment->getInvoice(), new Am_Request(array('receipt_id' => 'rr')), false);
     $transaction->setAmount($amount);
     $result->setSuccess($transaction);
 }
Пример #26
0
 public function processRefund(InvoicePayment $payment, Am_Paysystem_Result $result, $amount)
 {
     $tr = new Am_Paysystem_Transaction_Paymill_Refund($this, $payment->getInvoice(), $payment->receipt_id, $amount);
     $tr->run($result);
 }
Пример #27
0
 function __construct(InvoicePayment $payment)
 {
     $this->invoice = $payment->getInvoice();
     $this->payment = $payment;
 }