@ 2015-11-23T14:59:13Z <?php
$client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint);
$transaction = [
'Customer' => [
'Reference' => 'A12345',
'Title' => 'Mr.',
'FirstName' => 'John',
'LastName' => 'Smith',
'CompanyName' => 'Demo Shop 123',
'JobDescription' => 'Developer',
'Street1' => 'Level 5',
'Street2' => '369 Queen Street',
'City' => 'Sydney',
'State' => 'NSW',
'PostalCode' => '2000',
'Country' => 'au',
'Phone' => '09 889 0986',
'Mobile' => '09 889 6542',
'Email' => 'demo@example.org',
"Url" => "http://www.ewaypayments.com",
'CardDetails' => [
'Name' => 'John Smith',
'Number' => '4444333322221111',
'ExpiryMonth' => '12',
'ExpiryYear' => '25',
'CVN' => '123',
]
],
'ShippingAddress' => [
'ShippingMethod' => \Eway\Rapid\Enum\ShippingMethod::NEXT_DAY,
'FirstName' => 'John',
'LastName' => 'Smith',
'Street1' => 'Level 5',
'Street2' => '369 Queen Street',
'City' => 'Sydney',
'State' => 'NSW',
'Country' => 'au',
'PostalCode' => '2000',
'Phone' => '09 889 0986',
],
'Items' => [
[
'SKU' => '12345678901234567890',
'Description' => 'Item Description 1',
'Quantity' => 1,
'UnitCost' => 400,
'Tax' => 100,
// Total is calculated automatically
],
[
'SKU' => '123456789012',
'Description' => 'Item Description 2',
'Quantity' => 1,
'UnitCost' => 400,
'Tax' => 100,
],
],
'Options' => [
[
'Value' => 'Option1',
],
[
'Value' => 'Option2',
],
],
'Payment' => [
'TotalAmount' => 1000,
'InvoiceNumber' => 'Inv 21540',
'InvoiceDescription' => 'Individual Invoice Description',
'InvoiceReference' => '513456',
'CurrencyCode' => 'AUD',
],
'DeviceID' => 'D1234',
'CustomerIP' => '127.0.0.1',
'PartnerID' => 'ID',
'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
'Capture' => true,
];
$response = $client->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Fatal error: Uncaught Error: Class "Eway\Rapid" not found in /in/CDet7:3
Stack trace:
#0 {main}
thrown in /in/CDet7 on line 3
Process exited with code 255 . Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.25 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 Fatal error: Uncaught Error: Class 'Eway\Rapid' not found in /in/CDet7:3
Stack trace:
#0 {main}
thrown in /in/CDet7 on line 3
Process exited with code 255 . Output for 5.5.0 - 5.5.38 , 5.6.0 - 5.6.38 Fatal error: Class 'Eway\Rapid' not found in /in/CDet7 on line 3
Process exited with code 255 . preferences:dark mode live preview
219.93 ms | 402 KiB | 293 Q