Overview
  • Namespace
  • Class

Namespaces

  • Omnipay
    • Pagarme
      • Message

Classes

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

Class AbstractRequest

Abstract Request

Omnipay\Common\Message\AbstractRequest
Extended by Omnipay\Pagarme\Message\AbstractRequest

Direct known subclasses

Omnipay\Pagarme\Message\AuthorizeRequest, Omnipay\Pagarme\Message\CaptureRequest, Omnipay\Pagarme\Message\CreateCardRequest, Omnipay\Pagarme\Message\CreateCustomerRequest, Omnipay\Pagarme\Message\InstallmentsRequest, Omnipay\Pagarme\Message\RefundRequest

Indirect known subclasses

Omnipay\Pagarme\Message\PurchaseRequest, Omnipay\Pagarme\Message\VoidRequest

Abstract
Namespace: Omnipay\Pagarme\Message
Located at Message/AbstractRequest.php

Methods summary

public Omnipay\Pagarme\CreditCard
# getCard( )

Get the card.

Get the card.

Returns

Omnipay\Pagarme\CreditCard
public Omnipay\Pagarme\Message\AbstractRequest
# setCard( Omnipay\Pagarme\CreditCard $value )

Sets the card.

Sets the card.

Parameters

$value

Returns

Omnipay\Pagarme\Message\AbstractRequest
Provides a fluent interface
public string
# getApiKey( )

Get API key

Get API key

Returns

string
API key
public Omnipay\Pagarme\Message\AbstractRequest
# setApiKey( string $value )

Set API key

Set API key

Parameters

$value

Returns

Omnipay\Pagarme\Message\AbstractRequest
provides a fluent interface.
public array
# getCustomer( )

Get Customer Data

Get Customer Data

Returns

array
customer data
public Omnipay\Pagarme\Message\AbstractRequest
# setCustomer( array $value )

Set Customer data

Set Customer data

Parameters

$value

Returns

Omnipay\Pagarme\Message\AbstractRequest
provides a fluent interface.
public string
# getCustomerReference( )

Get the customer reference

Get the customer reference

Returns

string
customer reference
public Omnipay\Pagarme\Message\AbstractRequest
# setCustomerReference( $value )

Set the customer reference

Set the customer reference

Used when calling CreateCardRequest on an existing customer. If this parameter is not set then a new customer is created.

Returns

Omnipay\Pagarme\Message\AbstractRequest
provides a fluent interface.
public string
# getCardHash( )

Get the card hash

Get the card hash

Returns

string
card hash
public Omnipay\Pagarme\Message\AbstractRequest
# setCardHash( $value )

Set the card hash

Set the card hash

Must be a card hash like the ones returned by Pagarme.js.

Returns

Omnipay\Pagarme\Message\AbstractRequest
provides a fluent interface.
public array
# getMetadata( )

Get Metadata

Get Metadata

Returns

array
metadata
public Omnipay\Pagarme\Message\AbstractRequest
# setMetadata( array $value )

Parameters

$value

Returns

Omnipay\Pagarme\Message\AbstractRequest
provides a fluent interface.
protected array
# insertApiKeyToData( array $data )

Insert the API key into de array.

Insert the API key into de array.

Parameters

$data

Returns

array
The data with the API key to be used in all Requests
public string
# getHttpMethod( )

Get HTTP Method.

Get HTTP Method.

This is nearly always POST but can be over-ridden in sub classes.

Returns

string
the HTTP method
public
# sendData( $data )
protected
# getEndpoint( )
protected
# createResponse( $data )
protected array
# getCardData( )

Get the card data.

Get the card data.

Because the pagarme gateway uses a common format for passing card data to the API, this function can be called to get the data from the associated card object in the format that the API requires.

Returns

array
card data
protected array
# getCustomerData( )

Get the Customer data.

Get the Customer data.

Because the pagarme gateway uses a common format for passing customer data to the API, this function can be called to get the data from the card object in the format that the API requires.

Returns

array
customer data
protected array
# extractDddPhone( string $phoneNumber )

Separate DDD from phone numbers in an array containing two keys:

Separate DDD from phone numbers in an array containing two keys:

  • ddd
  • number

Parameters

$phoneNumber
phone number with DDD (byref)

Returns

array
the Phone number and the DDD with two digits
protected array
# extractAddress( string $address )

Separate data from the credit card Address in an array containing the keys: * street * street_number * complementary

Separate data from the credit card Address in an array containing the keys: * street * street_number * complementary

It's important to provide the parameter $address with the information in the given order and separated by commas.

Parameters

$address

Returns

array
containing the street, street_number and complementary

Properties summary

protected string $endpoint

Live or Test Endpoint URL

Live or Test Endpoint URL

# 'https://api.pagar.me/1/'
API documentation generated by ApiGen