Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP

Classes

  • AbstractRestRequest
  • CreateCardRequest
  • CreateCustomerRequest
  • CreatePlanRequest
  • CreateSubscriptionRequest
  • DeleteCustomerRequest
  • FetchAllPlansRequest
  • FetchCustomerRequest
  • FetchPlanRequest
  • FetchSubscriptionRequest
  • FetchTransactionRequest
  • PurchaseRequest
  • RefundRequest
  • RestResponse
  • Overview
  • Namespace
  • Class
  • Tree

Class RefundRequest

Fat Zebra REST Refund Request

In order to refund a purchase you must submit the following details:

  • Amount (numerical)
  • Reference (The Transaction ID of the original transaction to be refunded (XXX-P-YYYYYY))
  • Reference (String) - (The merchants reference for the refund -- in this class we create it by appending '-REFUND' to the original transaction reference.)

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(
      'amount'                   => '10.00',
      '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 implements Omnipay\Common\Message\RequestInterface
Extended by Omnipay\Fatzebra\Message\AbstractRestRequest
Extended by Omnipay\Fatzebra\Message\RefundRequest
Namespace: Omnipay\Fatzebra\Message
See: Omnipay\Fatzebra\Message\PurchaseRequest
See: Omnipay\Fatzebra\FatzebraGateway
Link: http://www.paystream.com.au/developer-guides/
Located at Message/RefundRequest.php
Methods summary
public mixed
# getData( )

Get the raw data array for this message. The format of this varies from gateway to gateway, but will usually be either an associative array, or a SimpleXMLElement.

Get the raw data array for this message. The format of this varies from gateway to gateway, but will usually be either an associative array, or a SimpleXMLElement.

Returns

mixed
protected string
# getEndpoint( )

Get transaction endpoint.

Get transaction endpoint.

Refunds are created using the /purchases resource.

Returns

string

Overrides

Omnipay\Fatzebra\Message\AbstractRestRequest::getEndpoint()
Methods inherited from Omnipay\Fatzebra\Message\AbstractRestRequest
getHttpMethod(), getUsername(), sendData(), setUsername()
Methods inherited from Omnipay\Common\Message\AbstractRequest
__construct(), formatCurrency(), getAmount(), getAmountInteger(), getCancelUrl(), getCard(), getCardReference(), getClientIp(), getCurrency(), getCurrencyDecimalPlaces(), getCurrencyNumeric(), getDescription(), getIssuer(), getItems(), getNotifyUrl(), getParameter(), getParameters(), getPaymentMethod(), getResponse(), getReturnUrl(), getTestMode(), getToken(), getTransactionId(), getTransactionReference(), initialize(), send(), setAmount(), setCancelUrl(), setCard(), setCardReference(), setClientIp(), setCurrency(), setDescription(), setIssuer(), setItems(), setNotifyUrl(), setParameter(), setPaymentMethod(), setReturnUrl(), setTestMode(), setToken(), setTransactionId(), setTransactionReference(), toFloat(), validate()
Constants inherited from Omnipay\Fatzebra\Message\AbstractRestRequest
API_VERSION
Properties inherited from Omnipay\Fatzebra\Message\AbstractRestRequest
$liveEndpoint, $testEndpoint
Properties inherited from Omnipay\Common\Message\AbstractRequest
$httpClient, $httpRequest, $negativeAmountAllowed, $parameters, $response, $zeroAmountAllowed
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen