Update a payment

@param  integer $iRefundId The ID of the refund to update
@param  array   $aData     The data to update the payment with

@return boolean
19240
public function update($iRefundId, array $aData = []): bool
    {
        $oDb = Factory::service('Database');

        try {

            $oDb->trans_begin();

            unset($aData['ref']);

            $bResult = parent::update($iRefundId, $aData);

            if (!$bResult) {
                throw new PaymentException('Failed to update refund.', 1);
            }

            $oDb->trans_commit();
            $this->triggerEvent(
                Events::REFUND_UPDATED,
                [$this->getRefundForEvent($iRefundId)]
            );

            return $bResult;

        } catch (\Exception $e) {
            $oDb->trans_rollback();
            $this->setError($e->getMessage());
            return false;
        }
    }
912589
def update_refund(self, refund_id, refund_deets):
        """"""
        request = self._put('transactions/refunds/' + str(refund_id), refund_deets)
        return self.responder(request)
419207
public function setFailed($iRefundId, $aData = [])
    {
        $aData['status'] = self::STATUS_FAILED;
        return $this->update($iRefundId, $aData);
    }
394708
public function updatePaymentDetail(PaymentDetailTransfer $paymentData, $idOrder)
    {
        $this->getFactory()->createPaymentManager()->updatePaymentDetail($paymentData, $idOrder);
    }
709209
public function updateRecurringPaymentsProfile($data, $id)
    {
        $this->post = $this->setRequestData($data)->merge([
            'PROFILEID' => $id,
        ]);

        return $this->doPayPalRequest('UpdateRecurringPaymentsProfile');
    }
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
972723
public function getById($iId, $aData = [])
    {
        if (empty($aData['where'])) {
            $aData['where'] = [];
        }

        $aData['where'][] = [$this->sTableAlias . '.id', $iId];

        $aEmails = $this->getAll(null, null, $aData);

        return !empty($aEmails) ? reset($aEmails) : false;
    }
919982
public function setProcessing($iPaymentId, $aData = []): bool
    {
        $aData['status'] = self::STATUS_PROCESSING;
        return $this->update($iPaymentId, $aData);
    }
808429
public function refundByTransactionId(
        $orderNo,
        $refundNo,
        $totalFee,
        $refundFee = null,
        $opUserId = null,
        $refundAccount = 'REFUND_SOURCE_UNSETTLED_FUNDS'
    ) {
        return $this->refund($orderNo, $refundNo, $totalFee, $refundFee, $opUserId, self::TRANSACTION_ID, $refundAccount);
    }
914503
public function update($mIds, array $aData = []): bool
    {
        $mResult = parent::update($mIds, $aData);
        if ($mResult) {
            $aIds = (array) $mIds;
            foreach ($aIds as $iId) {
                $this->saveBreadcrumbs($iId);
            }
            $this->saveOrder();
        }
        return $mResult;
    }
270238
public function refund($mpayTid, $amount)
    {
        $this->integrityCheck();

        $this->validateAmount($amount);

        $creditAmountResult = $this->mpay24Sdk->manualCredit($mpayTid, $amount);

        $this->recordedLastMessageExchange('RefundAmount');

        return $creditAmountResult;
    }
388788
public function CreateRefund($payInId, $refund, $idempotencyKey = null)
    {
        return $this->CreateObject('payins_createrefunds', $refund, '\MangoPay\Refund', $payInId, null, $idempotencyKey);
    }
1350413
public function cancelRefund($refundID, $paymentID)
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Secret = $this->getSecretCode();
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->RefundID = $refundID;
        $obj->PaymentID = $paymentID;
        // -----------------------------------------  
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for cancelRefunt and get response
        $result = $this->client->CancelRefund($obj);
        $result = $result->CancelRefundResult;

        $obj->Timestamp = $result->Timestamp;
        $obj->Success = $result->Success;

        // Unset properties for new Checksum
        unset($obj->RefundID, $obj->PaymentID, $obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (array) $result;
    }
1089250
protected function getCountCommonCompileSelect(array &$aData)
    {
        if (!empty($aData['select'])) {
            $oDb = Factory::service('Database');
            $oDb->select($aData['select']);
        }
    }
1077653
public function isPaymentRefund($idSalesOrder, $idSalesOrderItem)
    {
        $status = PayoneTransactionStatusConstants::TXACTION_REFUND;

        return $this->isPayment($idSalesOrder, $idSalesOrderItem, $status);
    }
366690
public function isPaymentAppointed($idSalesOrder, $idSalesOrderItem)
    {
        $status = PayoneTransactionStatusConstants::TXACTION_APPOINTED;

        return $this->isPayment($idSalesOrder, $idSalesOrderItem, $status);
    }
147657
protected function setRefundComplete($sTxnId = null, $iFeeRefunded = null)
    {
        //  Ensure we have a payment
        if (empty($this->oRefund)) {
            throw new RequestException('No refund selected.');
        }

        //  Update the refund
        $aData = ['txn_id' => $sTxnId ? $sTxnId : null];

        if (!is_null($iFeeRefunded)) {
            $aData['fee'] = $iFeeRefunded;
        }

        if (!$this->oRefundModel->setComplete($this->oRefund->id, $aData)) {
            throw new RequestException('Failed to update existing refund.');
        }

        // Update the associated payment, if the payment is fully refunded then mark it so
        $oPayment = $this->oPaymentModel->getById($this->oRefund->payment_id);
        if ($oPayment->available_for_refund->raw > 0) {
            $this->oPaymentModel->setRefundedPartial($oPayment->id);
        } else {
            $this->oPaymentModel->setRefunded($oPayment->id);
        }

        //  Send receipt email
        $this->oRefundModel->sendReceipt($this->oRefund->id);

        return $this;
    }