Class CreatePlanRequest
Fat Zebra REST Create Plan Request
In order to create a new recurring purchase plan you must submit the following details:
- Name (string)
- Reference (your internal reference -- this will be used to look up the plan). This must be unique -- plans with duplicate references will cause an error.
- Description
- Amount (numerical)
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 )); // Do a create plan transaction on the gateway $transaction = $gateway->CreatePlan(array( 'name' => 'Test Plan', 'transactionReference' => 'TestPlan', 'description' => 'A plan created for testing', 'amount' => '10.00', )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Create Plan transaction was successful!\n"; $plan_id = $response->getTransactionReference(); echo "Plan reference = " . $plan_id . "\n"; }
- Omnipay\Common\Message\AbstractRequest implements Omnipay\Common\Message\RequestInterface
- Omnipay\Fatzebra\Message\AbstractRestRequest
- Omnipay\Fatzebra\Message\CreatePlanRequest
Namespace: Omnipay\Fatzebra\Message
See:
Link: http://www.paystream.com.au/developer-guides/
Located at Message/CreatePlanRequest.php
See:
Omnipay\Fatzebra\FatzebraGateway
Link: http://www.paystream.com.au/developer-guides/
Located at Message/CreatePlanRequest.php
public
string
|
|
public
|
|
public
mixed
|
|
protected
string
|
getHttpMethod(),
getUsername(),
sendData(),
setUsername()
|
API_VERSION
|
$liveEndpoint,
$testEndpoint
|
$httpClient,
$httpRequest,
$negativeAmountAllowed,
$parameters,
$response,
$zeroAmountAllowed
|