I have followed the document site https://eway.io/api-v3/
to integrate the Payment system into my PHP application. And I run the command composer require eway/eway-rapid-php
from terminal in the application. After that I load autoload.php
.
Now I want to send customer into eWay payment site for choose payment method(paypal, CC) as well as paypal/CC information. So that customer can feel that they are paying by eWay payment gateway. I have the following code into my controller method:
$apiKey = '5XwiMIQ3EBkSlP5XwiMIQ3EBkSlP5XwiMIQ3EBkSlP...................';
$apiPassword = '12222......';
$apiEndpoint = \Eway\Rapid\Client::MODE_SANDBOX; // Use \Eway\Rapid\Client::MODE_PRODUCTION when you go live
$client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint);
$transaction = [
'RedirectUrl' => 'http://www.eway.com.au',
'CancelUrl' => "http://www.eway.com.au",
'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
'Payment' => [
'TotalAmount' => 1000,
]
];
$response = $client->createTransaction(\Eway\Rapid\Enum\ApiMethod::RESPONSIVE_SHARED, $transaction);
It's returning the "Error connecting to Rapid gateway"
| error code S9992
Also I followed the url https://github.com/eWAYPayment/eway-rapid-php
.
Do I miss anything? Would you please help me out?