Class AuthorizeRequest
Dummy Authorize Request
Example
$gateway = Omnipay::create('Dummy');
$gateway->initialize(array(
'testMode' => true,
));
$card = new CreditCard(array(
'firstName' => 'Example',
'lastName' => 'Customer',
'number' => '4242424242424242',
'expiryMonth' => '01',
'expiryYear' => '2020',
'cvv' => '123',
));
$transaction = $gateway->authorize(array(
'amount' => '10.00',
'currency' => 'AUD',
'card' => $card,
));
$response = $transaction->send();
if ($response->isSuccessful()) {
echo "Authorize transaction was successful!\n";
$sale_id = $response->getTransactionReference();
echo "Transaction reference = " . $sale_id . "\n";
}
-
Omnipay\Common\Message\AbstractRequest
implements
Omnipay\Common\Message\RequestInterface
-
Omnipay\Dummy\Message\AuthorizeRequest
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
|
public
ResponseInterface
|
#
sendData( mixed $data )
Send the request with specified data
Send the request with specified data
Parameters
Returns
ResponseInterface
|
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()
|