Query refund status.

@param string $orderNo
@param string $type

@return \EntWeChat\Support\Collection
170072
public function queryRefund($orderNo, $type = self::OUT_TRADE_NO)
    {
        $params = [
            $type => $orderNo,
        ];

        return $this->request(self::API_QUERY_REFUND, $params);
    }
444670
public function query($type) {
        $query = $this->getDriver()->newQuery($type);
        $query->setRepository($this);
        $query->from($this->getTable(), $this->getAlias());

        return $query;
    }
280014
public static function orderBy($col = 'id', $type='asc')
    {
        try {
            self::init();
            $query = 'SELECT * FROM ' . self::$modelTable . ' ORDER BY '.$col. ' '.$type;
            return new QueryBuilder(self::$connect, $query);

        } catch (\Exception $exception) {
            var_dump($exception->getMessage());
        }
    }
70031
def refund_order(self, request, pk):
        
        order = Order.objects.get(id=pk)
        order.refund()
        return Response(status=status.HTTP_204_NO_CONTENT)
36267
public function fetch($type = parent::FETCH_TYPE_NUM)
    {
        $callback = $this->_callback;
        $row = $this->_statement->fetch($type);

        return $row === false ? $row : $callback($row);
    }
806424
public RefundQueryResponse queryByOutTradeNo(String outTradeNo){
        Map<String, String> queryParams = buildQueryParams(WepayField.OUT_TRADE_NO, outTradeNo);
        Map<String, Object> respData = doPost(QUERY, queryParams);
        return renderQueryResp(respData);
    }
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)];
    }
873342
public function refund($amount, $reference, array $options = [])
    {
        $url = sprintf($this->gateway->buildUrlFromString('charges').'/%s/refund', $reference);

        return $this->gateway->commit('post', $url, [
            'amount'      => $this->gateway->amount($amount),
            'description' => Arr::get($options, 'description'),
        ]);
    }
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);
    }
1170472
public function isRefundApproved(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_REFUND,
            PayoneApiConstants::RESPONSE_TYPE_APPROVED
        );
    }
1097615
public function createNew($type = OrderTypes::TYPE_ORDER)
    {
        $order = parent::createNew();
        $order->setType($type);

        return $order;
    }
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');
    }
994320
function checkCurrency( $orderID )
    {
        $returnStatus = array( 'status' => eZModuleOperationInfo::STATUS_CONTINUE );
        $order = eZOrder::fetch( $orderID );
        $productCollection = $order->attribute( 'productcollection' );
        $currencyCode = $productCollection->attribute( 'currency_code' );
        $currencyCode = trim( $currencyCode );
        if ( $currencyCode == '' )
        {
            $returnStatus = array( 'status' => eZModuleOperationInfo::STATUS_CANCELLED );
        }

        $locale = eZLocale::instance();
        $localeCurrencyCode = $locale->currencyShortName();

        // Reverse logic to avoid calling eZCurrencyData::currencyExists() if the first expression is true.
        if ( !( $currencyCode == $localeCurrencyCode or
                eZCurrencyData::currencyExists( $currencyCode ) ) )
        {
            $returnStatus = array( 'status' => eZModuleOperationInfo::STATUS_CANCELLED );
        }
        return $returnStatus;
    }
961962
public function closeOrder($out_trade_no)
    {
        $pay = new Order($this->config->get());
        return $pay->close($out_trade_no);
    }
1032448
protected function query(string $number, string $type)
    {
        $params = [
            'appid' => $this->app['config']->app_id,
            $type => $number,
        ];

        return $this->request($this->wrap('pay/refundquery'), $params);
    }
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']);
    }
289673
public function getInstancesOf(string $type, bool $reverseOrder = false): array
    {
        $plugins = array_filter(
            $this->getInstances(),
            function ($plugin) use ($type) {
                return is_a($plugin, $type);
            }
        );

        if ($reverseOrder) {
            $plugins = array_reverse($plugins, true);
        }

        return array_diff_key($plugins, array_flip($this->disabled));
    }