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 CreateCustomerRequest

Fat Zebra REST Create Customer Request

To create a new customer the following details are required:

  • First Name
  • Last Name
  • Reference (such as your customer's ID number)
  • Email address (used to deliver email receipts if requested)
  • IP Address Optional
  • Card details
    • Card Holder (if different from the customer's name)
    • Card Number
    • Expiry Date
    • CVV
  • Address Details Optional
    • Address
    • City
    • State
    • Postcode
    • Country

Example:

// Create a gateway for the Fat Zebra REST Gateway
  // (routes to GatewayFactory::create)
  $gateway = Omnipay::create('FatzebraGateway');

  // Initialise the gateway
  $gateway->initialize(array(
      'username' => 'TEST',
      'token'    => 'TEST',
      'testMode' => true, // Or false when you are ready for live transactions
  ));

  // Create a credit card object
  // This card can be used for testing.
  $card = new CreditCard(array(
              'firstName'    => 'Example',
              'lastName'     => 'Customer',
              'number'       => '4005550000000001',
              'expiryMonth'  => '01',
              'expiryYear'   => '2020',
              'cvv'          => '123',
              'billingAddress1'       => '1 Scrubby Creek Road',
              'billingCountry'        => 'AU',
              'billingCity'           => 'Scrubby Creek',
              'billingPostcode'       => '4999',
              'billingState'          => 'QLD',
              'email'                 => 'email@example.com',
  ));

  // Do a create customer transaction on the gateway
  $transaction = $gateway->createCustomer(array(
      'transactionId'            => 'TestCustomer1234',
      'clientIp'                 => $_SERVER['REMOTE_ADDR'],
      'card'                     => $card,
  ));
  $response = $transaction->send();
  if ($response->isSuccessful()) {
      echo "createCustomer transaction was successful!\n";
      $customer_id = $response->getCustomerReference();
      echo "Customer Reference = " . $customer_id . "\n";
      $card_id = $response->getCardReference();
      echo "Card Reference = " . $card_id . "\n";
  }
Omnipay\Common\Message\AbstractRequest implements Omnipay\Common\Message\RequestInterface
Extended by Omnipay\Fatzebra\Message\AbstractRestRequest
Extended by Omnipay\Fatzebra\Message\CreateCustomerRequest
Namespace: Omnipay\Fatzebra\Message
See: Omnipay\Fatzebra\FatzebraGateway
Link: http://www.paystream.com.au/developer-guides/
Located at Message/CreateCustomerRequest.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.

Referenceizes 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