Get the refund.

@param CardPayments\Refund $refund
@return CardPayments\Refund[]
@throws PaysafeException
3218
public function getRefund(CardPayments\Refund $refund)
    {
        $refund->setRequiredFields(array('id'));
        $refund->checkRequiredFields();

        $request = new Request(array(
             'method' => Request::GET,
             'uri' => $this->prepareURI("/refunds/" . $refund->id)
        ));

        $response = $this->client->processRequest($request);
        return new CardPayments\Refund($response);
    }
816227
def show_refund(self, refund_id):
        """"""
        request = self._get('transactions/refunds/' + str(refund_id))
        return self.responder(request)
1037800
public function get($orderId, $refundId, array $params = array())
    {
        $endpoint = '/admin/orders/'.$orderId.'/refunds/'.$refundId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Refund::class, $response['refund']);
    }
904321
public function refundTransaction($params)
    {
        $this->sdk->ServiceURL = $this->getApiEndpoint('AioChargeback');
        $this->sdk->ChargeBack = array_replace(
            $this->sdk->ChargeBack,
            array_intersect_key($params, $this->sdk->ChargeBack)
        );

        return $this->sdk->AioChargeback();
    }
968105
private function _refundToBuyer($refundAmount, $refundCurrency)
    {
        $response = $this->callStepAndCheckForException(
            'refundToBuyer',
            array($refundAmount, $refundCurrency)
        );
        echo $this->printResponseToWebpage("printRefundResponse", array($response));
        return $response->getRefundResult()
            ->getRefundDetails()->getAmazonRefundId();
    }
1165543
public function refundTransaction($transaction, $amount = 0.00)
    {
        $this->setRequestData([
            'TRANSACTIONID' => $transaction,
        ]);

        if ($amount > 0) {
            $this->post = $this->post->merge([
                'REFUNDTYPE' => 'Partial',
                'AMT'        => $amount,
            ]);
        }

        return $this->doPayPalRequest('RefundTransaction');
    }
821643
public function refund($options, $refund_amount = null)
    {
        if (!is_array($options)) $options = ['out_trade_no' => $options, 'refund_amount' => $refund_amount];
        $this->options->set('method', 'alipay.trade.refund');
        return $this->getResult($options);
    }
1224855
function RefundTransaction($oID, $txnID, $amount = 'Full', $note = '', $curCode = 'USD') {
    if ($this->_mode == 'payflow') {
      $values['ORIGID'] = $txnID;
      $values['TENDER'] = 'C';
      $values['TRXTYPE'] = 'C';
      $values['AMT'] = number_format((float)$amount, 2);
      if ($note != '') $values['COMMENT2'] = $note;
    } elseif ($this->_mode == 'nvp') {
      $values['TRANSACTIONID'] = $txnID;
      if ($amount != 'Full' && (float)$amount > 0) {
        $values['REFUNDTYPE'] = 'Partial';
        $values['CURRENCYCODE'] = $curCode;
        $values['AMT'] = number_format((float)$amount, 2);
      } else {
        $values['REFUNDTYPE'] = 'Full';
      }
      if ($note != '') $values['NOTE'] = $note;
    }
    return $this->_request($values, 'RefundTransaction');
  }
259390
public function refund($order): Collection
    {
        $this->payload = Support::filterPayload($this->payload, $order, true);

        Events::dispatch(Events::METHOD_CALLED, new Events\MethodCalled('Wechat', 'Refund', $this->gateway, $this->payload));

        return Support::requestApi(
            'secapi/pay/refund',
            $this->payload,
            true
        );
    }
279652
public function refund_payment($id) {
        $request = array(
            "uri" => "/v1/payments/{$id}/refunds",
            "params" => array(
                "access_token" => $this->get_access_token()
            )
        );

        $response = MPRestClient::post($request);
        return $response;
    }
1356290
public function getTotalRefund()
    {
        //filter by customer id
        $customerOrders = $this->orderCollection->create()
            ->addAttributeToFilter('customer_id', $this->model->getId());

        $totalRefunded = 0;
        //calculate total refunded
        foreach ($customerOrders as $order) {
            $refunded = $order->getTotalRefunded();
            $totalRefunded += $refunded;
        }

        return $totalRefunded;
    }
41970
public function refunds()
    {
        if (!isset($this->_links->refunds->href)) {
            return new RefundCollection($this->client, 0, null);
        }

        $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);

        return ResourceFactory::createCursorResourceCollection(
            $this->client,
            $result->_embedded->refunds,
            Refund::class,
            $result->_links
        );
    }
767925
public function refund(array $order)
    {
        Datasheet::set($order);
        $param_keys = ['appid', 'mch_id', 'out_trade_no', 'transaction_id', 'out_refund_no',
            'total_fee', 'refund_fee', 'nonce_str'];
        return Helper::request(Helper::GATEWAY_REFUNDORDER, $param_keys, Helper::SSL_VERIFY);
    }
75783
protected function getAction()
    {
        $action    = self::CAPTURE_ACTION;
        $request   = $this->getRequest();
        $rawAmount = $request->getRequestParameter(self::MC_GROSS);
        $status    = $request->getRequestParameter(self::PAYPAL_PAYMENT_STATUS);

        if ((0 > $rawAmount) && (self::PAYPAL_STATUS_REFUND_DONE == $status)) {
            $action = self::REFUND_ACTION;
        }

        return $action;
    }
640830
public function createRefund(array $options)
    {
        $pay = new Refund($this->config->get());
        return $pay->create($options);
    }
795955
protected function getRefundAmount($response)
    {
        $lastCharge = Arr::last($response['charges']['data']);
        $lastRefund = Arr::last($lastCharge['refunds']['data']);

        return abs($lastRefund['amount']);
    }
260135
protected function getReferences($response, $type)
    {
        if (in_array($type, ['order', 'refund'])) {
            $charges = $response['charges']['data'];
            $charge = Arr::last($charges);

            if ($type === 'refund') {
                $refunds = $charge['refunds']['data'];
                $refund = Arr::last($refunds);

                return [$refund['id'], $refund['auth_code']];
            }

            $id = $charge['id'];
        } else {
            $id = $response['id'];
        }

        return [$id, $this->getAuthorization($response)];
    }