PHP 클래스 Omnipay\Common\Message\AbstractRequest

상속: implements Omnipay\Common\Message\RequestInterface
파일 보기 프로젝트 열기: omnipay/common 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$httpClient Guzzle\Http\ClientInterface The request client.
$httpRequest Symfony\Component\HttpFoundation\Request The HTTP request object.
$negativeAmountAllowed boolean
$parameters Symfony\Component\HttpFoundation\ParameterBag The request parameters
$response Omnipay\Common\Message\ResponseInterface An associated ResponseInterface.
$zeroAmountAllowed boolean

공개 메소드들

메소드 설명
__construct ( Guzzle\Http\ClientInterface $httpClient, Request $httpRequest ) Create a new Request
formatCurrency ( $amount ) : string Format an amount for the payment currency.
getAmount ( ) : string Validates and returns the formated amount.
getAmountInteger ( ) : integer Get the payment amount as an integer.
getCancelUrl ( ) : string Get the request cancel URL.
getCard ( ) : CreditCard Get the card.
getCardReference ( ) : string Get the card reference.
getClientIp ( ) : string Get the client IP address.
getCurrency ( ) : string Get the payment currency code.
getCurrencyDecimalPlaces ( ) : integer Get the number of decimal places in the payment currency.
getCurrencyNumeric ( ) : integer Get the payment currency number.
getDescription ( ) : string Get the request description.
getIssuer ( ) : string Get the payment issuer.
getItems ( ) : Omnipay\Common\ItemBag | null A list of items in this order
getNotifyUrl ( ) : string Get the request notify URL.
getParameters ( ) : array Get all parameters as an associative array.
getPaymentMethod ( ) : string Get the payment issuer.
getResponse ( ) : Omnipay\Common\Message\ResponseInterface Get the associated Response.
getReturnUrl ( ) : string Get the request return URL.
getTestMode ( ) : boolean Gets the test mode of the request from the gateway.
getToken ( ) : string Get the card token.
getTransactionId ( ) : string Get the transaction ID.
getTransactionReference ( ) : string Get the transaction reference.
initialize ( array $parameters = [] ) Initialize the object with parameters.
send ( ) : Omnipay\Common\Message\ResponseInterface Send the request
setAmount ( string $value ) : AbstractRequest Sets the payment amount.
setCancelUrl ( string $value ) : AbstractRequest Sets the request cancel URL.
setCard ( CreditCard $value ) : AbstractRequest Sets the card.
setCardReference ( string $value ) : AbstractRequest Sets the card reference.
setClientIp ( string $value ) : AbstractRequest Sets the client IP address.
setCurrency ( string $value ) : AbstractRequest Sets the payment currency code.
setDescription ( string $value ) : AbstractRequest Sets the request description.
setIssuer ( string $value ) : AbstractRequest Set the payment issuer.
setItems ( Omnipay\Common\ItemBag | array $items ) : AbstractRequest Set the items in this order
setNotifyUrl ( string $value ) : AbstractRequest Sets the request notify URL.
setPaymentMethod ( string $value ) : AbstractRequest Set the payment method.
setReturnUrl ( string $value ) : AbstractRequest Sets the request return URL.
setTestMode ( boolean $value ) : AbstractRequest Sets the test mode of the request.
setToken ( string $value ) : AbstractRequest Sets the card token.
setTransactionId ( string $value ) : AbstractRequest Sets the transaction ID.
setTransactionReference ( string $value ) : AbstractRequest Sets the transaction reference.
toFloat ( $value ) : float Convert an amount into a float.
validate ( ) Validate the request.

보호된 메소드들

메소드 설명
getParameter ( string $key ) : mixed Get a single parameter.
setParameter ( string $key, mixed $value ) : AbstractRequest Set a single parameter

비공개 메소드들

메소드 설명
getCurrencyDecimalFactor ( )

메소드 상세

__construct() 공개 메소드

Create a new Request
public __construct ( Guzzle\Http\ClientInterface $httpClient, Request $httpRequest )
$httpClient Guzzle\Http\ClientInterface A Guzzle client to make API calls with
$httpRequest Symfony\Component\HttpFoundation\Request A Symfony HTTP request object

formatCurrency() 공개 메소드

Format an amount for the payment currency.
public formatCurrency ( $amount ) : string
리턴 string

getAmount() 공개 메소드

Validates and returns the formated amount.
public getAmount ( ) : string
리턴 string The amount formatted to the correct number of decimal places for the selected currency.

getAmountInteger() 공개 메소드

Get the payment amount as an integer.
public getAmountInteger ( ) : integer
리턴 integer

getCancelUrl() 공개 메소드

Get the request cancel URL.
public getCancelUrl ( ) : string
리턴 string

getCard() 공개 메소드

Get the card.
public getCard ( ) : CreditCard
리턴 Omnipay\Common\CreditCard

getCardReference() 공개 메소드

Get the card reference.
public getCardReference ( ) : string
리턴 string

getClientIp() 공개 메소드

Get the client IP address.
public getClientIp ( ) : string
리턴 string

getCurrency() 공개 메소드

Get the payment currency code.
public getCurrency ( ) : string
리턴 string

getCurrencyDecimalPlaces() 공개 메소드

Get the number of decimal places in the payment currency.

getCurrencyNumeric() 공개 메소드

Get the payment currency number.
public getCurrencyNumeric ( ) : integer
리턴 integer

getDescription() 공개 메소드

Get the request description.
public getDescription ( ) : string
리턴 string

getIssuer() 공개 메소드

This field is used by some European gateways, and normally represents the bank where an account is held (separate from the card brand).
public getIssuer ( ) : string
리턴 string

getItems() 공개 메소드

A list of items in this order
public getItems ( ) : Omnipay\Common\ItemBag | null
리턴 Omnipay\Common\ItemBag | null A bag containing items in this order

getNotifyUrl() 공개 메소드

Get the request notify URL.
public getNotifyUrl ( ) : string
리턴 string

getParameter() 보호된 메소드

Get a single parameter.
protected getParameter ( string $key ) : mixed
$key string The parameter key
리턴 mixed

getParameters() 공개 메소드

Get all parameters as an associative array.
public getParameters ( ) : array
리턴 array

getPaymentMethod() 공개 메소드

This field is used by some European gateways, which support multiple payment providers with a single API.
public getPaymentMethod ( ) : string
리턴 string

getResponse() 공개 메소드

Get the associated Response.
public getResponse ( ) : Omnipay\Common\Message\ResponseInterface
리턴 Omnipay\Common\Message\ResponseInterface

getReturnUrl() 공개 메소드

Get the request return URL.
public getReturnUrl ( ) : string
리턴 string

getTestMode() 공개 메소드

Gets the test mode of the request from the gateway.
public getTestMode ( ) : boolean
리턴 boolean

getToken() 공개 메소드

Get the card token.
public getToken ( ) : string
리턴 string

getTransactionId() 공개 메소드

The transaction ID is the identifier generated by the merchant website.
public getTransactionId ( ) : string
리턴 string

getTransactionReference() 공개 메소드

The transaction reference is the identifier generated by the remote payment gateway.
public getTransactionReference ( ) : string
리턴 string

initialize() 공개 메소드

If any unknown parameters passed, they will be ignored.
public initialize ( array $parameters = [] )
$parameters array An associative array of parameters

send() 공개 메소드

Send the request
public send ( ) : Omnipay\Common\Message\ResponseInterface
리턴 Omnipay\Common\Message\ResponseInterface

setAmount() 공개 메소드

Sets the payment amount.
public setAmount ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setCancelUrl() 공개 메소드

Sets the request cancel URL.
public setCancelUrl ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setCard() 공개 메소드

Sets the card.
public setCard ( CreditCard $value ) : AbstractRequest
$value Omnipay\Common\CreditCard
리턴 AbstractRequest Provides a fluent interface

setCardReference() 공개 메소드

Sets the card reference.
public setCardReference ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setClientIp() 공개 메소드

Sets the client IP address.
public setClientIp ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setCurrency() 공개 메소드

Sets the payment currency code.
public setCurrency ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setDescription() 공개 메소드

Sets the request description.
public setDescription ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setIssuer() 공개 메소드

This field is used by some European gateways, and normally represents the bank where an account is held (separate from the card brand).
public setIssuer ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setItems() 공개 메소드

Set the items in this order
public setItems ( Omnipay\Common\ItemBag | array $items ) : AbstractRequest
$items Omnipay\Common\ItemBag | array An array of items in this order
리턴 AbstractRequest

setNotifyUrl() 공개 메소드

Sets the request notify URL.
public setNotifyUrl ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setParameter() 보호된 메소드

Set a single parameter
protected setParameter ( string $key, mixed $value ) : AbstractRequest
$key string The parameter key
$value mixed The value to set
리턴 AbstractRequest Provides a fluent interface

setPaymentMethod() 공개 메소드

This field is used by some European gateways, which support multiple payment providers with a single API.
public setPaymentMethod ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setReturnUrl() 공개 메소드

Sets the request return URL.
public setReturnUrl ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setTestMode() 공개 메소드

Sets the test mode of the request.
public setTestMode ( boolean $value ) : AbstractRequest
$value boolean True for test mode on.
리턴 AbstractRequest

setToken() 공개 메소드

Sets the card token.
public setToken ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setTransactionId() 공개 메소드

Sets the transaction ID.
public setTransactionId ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

setTransactionReference() 공개 메소드

Sets the transaction reference.
public setTransactionReference ( string $value ) : AbstractRequest
$value string
리턴 AbstractRequest Provides a fluent interface

toFloat() 공개 메소드

Convert an amount into a float.
public toFloat ( $value ) : float
리턴 float The amount converted to a float.

validate() 공개 메소드

This method is called internally by gateways to avoid wasting time with an API call when the request is clearly invalid.
public validate ( )

프로퍼티 상세

$httpClient 보호되어 있는 프로퍼티

The request client.
protected ClientInterface,Guzzle\Http $httpClient
리턴 Guzzle\Http\ClientInterface

$httpRequest 보호되어 있는 프로퍼티

The HTTP request object.
protected Request,Symfony\Component\HttpFoundation $httpRequest
리턴 Symfony\Component\HttpFoundation\Request

$negativeAmountAllowed 보호되어 있는 프로퍼티

protected bool $negativeAmountAllowed
리턴 boolean

$parameters 보호되어 있는 프로퍼티

The request parameters
protected ParameterBag,Symfony\Component\HttpFoundation $parameters
리턴 Symfony\Component\HttpFoundation\ParameterBag

$response 보호되어 있는 프로퍼티

An associated ResponseInterface.
protected ResponseInterface,Omnipay\Common\Message $response
리턴 Omnipay\Common\Message\ResponseInterface

$zeroAmountAllowed 보호되어 있는 프로퍼티

protected bool $zeroAmountAllowed
리턴 boolean