查询退款

        :param refund_id: 微信退款单号
        :param out_refund_no: 商户退款单号
        :param transaction_id: 微信订单号
        :param out_trade_no: 商户系统内部的订单号
        :param device_info: 可选，终端设备号
        :return: 返回的结果数据
342343
def query(self, refund_id=None, out_refund_no=None, transaction_id=None,
              out_trade_no=None, device_info=None):
        
        data = {
            'appid': self.appid,
            'device_info': device_info,
            'transaction_id': transaction_id,
            'out_trade_no': out_trade_no,
            'out_refund_no': out_refund_no,
            'refund_id': refund_id,
        }
        return self._post('pay/refundquery', data=data)
531684
def refundable?(options = {})
      @logger.debug("[refundable?] options=#{options.inspect}")

      validate_required_params!(options, :transaction_id)

      response = execute_request(:refund_info, options)
      response.refundable?
    end
816227
def show_refund(self, refund_id):
        """"""
        request = self._get('transactions/refunds/' + str(refund_id))
        return self.responder(request)
102399
def get_transactions_details(tx_hash_list, coin_symbol='btc', limit=None, api_key=None):
    

    for tx_hash in tx_hash_list:
        assert is_valid_hash(tx_hash)
    assert is_valid_coin_symbol(coin_symbol)

    if len(tx_hash_list) == 0:
        return []
    elif len(tx_hash_list) == 1:
        return [get_transaction_details(tx_hash=tx_hash_list[0],
                                        coin_symbol=coin_symbol,
                                        limit=limit,
                                        api_key=api_key
                                        )]

        url = make_url(coin_symbol, **dict(txs=';'.join(tx_hash_list)))

    params = {}
    if api_key:
        params['token'] = api_key
    if limit:
        params['limit'] = limit

    r = requests.get(url, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    response_dict_list = get_valid_json(r)

    cleaned_dict_list = []

    for response_dict in response_dict_list:
        if 'error' not in response_dict:
            if response_dict['block_height'] > 0:
                response_dict['confirmed'] = parser.parse(response_dict['confirmed'])
            else:
                # Blockcypher reports fake times if it's not in a block
                response_dict['confirmed'] = None
                response_dict['block_height'] = None

            # format this string as a datetime object
            response_dict['received'] = parser.parse(response_dict['received'])
        cleaned_dict_list.append(response_dict)

    return cleaned_dict_list
993542
protected static function deleteTransactionByIdAsyncWithHttpInfo($transaction_id) 
    {
        $returnType = '';  
        $request = self::deleteTransactionByIdRequest($transaction_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
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');
  }
88316
public BillDetail<RefundBill> queryRefund(String deviceInfo, String date){
        String data = query(deviceInfo, date, BillType.REFUND);
        return renderBillDetail(data, BillFields.REFUND, RefundBill.class);
    }
343960
def request_refund(options = {})
      response = JSON.parse(@client.patch("items/#{send(:id)}/request_refund", options).body)
      @attributes = response['items']
      true
    end
115850
def refund(self, callerReference, transactionId, refundAmount=None,
               callerDescription=None):
        
        params = {}
        params['CallerReference'] = callerReference
        params['TransactionId'] = transactionId
        if(refundAmount != None):
            params['RefundAmount'] = refundAmount
        if(callerDescription != None):
            params['CallerDescription'] = callerDescription
        
        response = self.make_request("Refund", params)
        body = response.read()
        if(response.status == 200):
            rs = ResultSet()
            h = handler.XmlHandler(rs, self)
            xml.sax.parseString(body, h)
            return rs
        else:
            raise FPSResponseError(response.status, response.reason, body)
774508
def refund(self, idempotency_key=None, **params):
        """"""
        headers = populate_headers(idempotency_key)
        url = self.instance_url() + '/refund'
        d = self.request('post', url, params, headers)
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)
24045
public RefundQueryResponse queryByRefundId(String refundId){
        Map<String, String> queryParams = buildQueryParams(WepayField.REFUND_ID, refundId);
        Map<String, Object> respData = doPost(QUERY, queryParams);
        return renderQueryResp(respData);
    }
1167658
def fetch_transaction_status(self, transaction_id):
        
        url = "%s%s%s/status" % (self.api_endpoint, constants.TRANSACTION_STATUS_ENDPOINT, transaction_id)

        username = self.base.get_username()
        password = self.base.get_password(username=username, request_url=url)

        response = requests.get(url, auth=HTTPBasicAuth(username=username, password=password))

        if response.status_code == 404:
            raise TransactionDoesNotExist('Wrong transaction ID!')

        if not self.base.verify_response(response.json()):
            raise SignatureValidationException('Server signature verification has failed')

        return response.json()
890193
public function deleteRefund($transaction_id)
    {
        $response = $this->client->delete('transactions/refunds/' . $transaction_id);
        return json_decode($response->getBody())->refund;
    }
1342017
def refund(amount = nil)
      warn "[DEPRECATED] refund as an instance method is deprecated. Please use Transaction.refund"
      result = @gateway.transaction.refund(id, amount)

      if result.success?
        SuccessfulResult.new(:new_transaction => result.transaction)
      else
        result
      end
    end
257037
protected static function deleteRefundTransactionByIdAsyncWithHttpInfo($refund_transaction_id) 
    {
        $returnType = '';  
        $request = self::deleteRefundTransactionByIdRequest($refund_transaction_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
921416
public Boolean refund(RefundDetail refundDetail){
        try {
            String url = Alipay.GATEWAY + "_input_charset=" + alipay.inputCharset;
            Map<String, String> refundParams = buildRefundParams(refundDetail);
            String resp = Http.get(url).params(refundParams).request();
            XmlReaders reader = XmlReaders.create(resp);
            String isSuccess = reader.getNodeStr("is_success");
            if ("T".equals(isSuccess)){
                return Boolean.TRUE;
            }
        } catch (XmlException e){
            // ignore xml parse error
        } catch (Exception e){
            throw new AliPayException(e);
        }
        return Boolean.FALSE;
    }
686917
public OvhRefund refund_refundId_GET(String refundId) throws IOException {
		String qPath = "/me/refund/{refundId}";
		StringBuilder sb = path(qPath, refundId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhRefund.class);
	}