Overview
  • Namespace
  • Class

Namespaces

  • Omnipay
    • Pagarme
      • Message

Classes

  • AbstractRequest
  • AuthorizeRequest
  • CaptureRequest
  • CreateCardRequest
  • CreateCustomerRequest
  • InstallmentsRequest
  • PurchaseRequest
  • RefundRequest
  • Response
  • VoidRequest

Class RefundRequest

Pagarme Refund Request

This route is used when you want to reverse a transaction performed by a charge via credit card. In case of reversal a transaction, only the id of the transaction is required to effect the reversal.

Example -- note this example assumes that the purchase has been successful and that the transaction ID returned from the purchase is held in $sale_id. See PurchaseRequest for the first part of this example transaction:

// Do a refund transaction on the gateway
  $transaction = $gateway->refund(array(
      'transactionReference'     => $sale_id,
  ));
  $response = $transaction->send();
  if ($response->isSuccessful()) {
      echo "Refund transaction was successful!\n";
      $refund_id = $response->getTransactionReference();
      echo "Transaction reference = " . $refund_id . "\n";
  }
Omnipay\Common\Message\AbstractRequest
Extended by Omnipay\Pagarme\Message\AbstractRequest
Extended by Omnipay\Pagarme\Message\RefundRequest

Direct known subclasses

Omnipay\Pagarme\Message\VoidRequest

Namespace: Omnipay\Pagarme\Message
See: Omnipay\Pagarme\Message\PurchaseRequest
See: Omnipay\Pagarme\Gateway
Link: https://docs.pagar.me/api/?shell#estorno-de-transao
Located at Message/RefundRequest.php

Methods summary

public
# getData( )
public
# getEndpoint( )

Overrides

Omnipay\Pagarme\Message\AbstractRequest::getEndpoint

Methods inherited from Omnipay\Pagarme\Message\AbstractRequest

createResponse(), extractAddress(), extractDddPhone(), getApiKey(), getCard(), getCardData(), getCardHash(), getCustomer(), getCustomerData(), getCustomerReference(), getHttpMethod(), getMetadata(), insertApiKeyToData(), sendData(), setApiKey(), setCard(), setCardHash(), setCustomer(), setCustomerReference(), setMetadata()

Properties summary

Properties inherited from Omnipay\Pagarme\Message\AbstractRequest

$endpoint

API documentation generated by ApiGen