The interactive walkthrough displays code examples alongside step-by-step explanations.
Follow the walkthrough to use the SDK in your PHP code.
{/* Hidden markdown content for server rendering and AI ingestion */}
/// Include autoloader and import client
Import the Payabli SDK to make it available in your code.
```php
new TransRequestBody([
'customerData' => new PayorDataRequest([
'customerId' => 4440,
]),
'entryPoint' => $entrypoint,
'ipaddress' => "255.255.255.255",
'paymentDetails' => new PaymentDetail([
'serviceFee' => 0,
'totalAmount' => 100,
]),
'paymentMethod' => new PayMethodCredit([
'cardcvv' => "999",
'cardexp' => "02/27",
'cardHolder' => "Kassiane Cassian",
'cardnumber' => "4111111111111111",
'cardzip' => "12345",
'initiator' => "payor",
'method' => "card",
]),
]),
]);
```
/// Execute the transaction
Call `moneyIn->getpaid()` to process the transaction. The client calls Payabli's `POST /MoneyIn/getpaid` endpoint.
```php focus=40
new TransRequestBody([
'customerData' => new PayorDataRequest([
'customerId' => 4440,
]),
'entryPoint' => $entrypoint,
'ipaddress' => "255.255.255.255",
'paymentDetails' => new PaymentDetail([
'serviceFee' => 0,
'totalAmount' => 100,
]),
'paymentMethod' => new PayMethodCredit([
'cardcvv' => "999",
'cardexp' => "02/27",
'cardHolder' => "Kassiane Cassian",
'cardnumber' => "4111111111111111",
'cardzip' => "12345",
'initiator' => "payor",
'method' => "card",
]),
]),
]);
$result = $client->moneyIn->getpaid($request);
```
/// Show the result
Log the transaction response. Check the output to see if the transaction was successful.
```php focus=42
new TransRequestBody([
'customerData' => new PayorDataRequest([
'customerId' => 4440,
]),
'entryPoint' => $entrypoint,
'ipaddress' => "255.255.255.255",
'paymentDetails' => new PaymentDetail([
'serviceFee' => 0,
'totalAmount' => 100,
]),
'paymentMethod' => new PayMethodCredit([
'cardcvv' => "999",
'cardexp' => "02/27",
'cardHolder' => "Kassiane Cassian",
'cardnumber' => "4111111111111111",
'cardzip' => "12345",
'initiator' => "payor",
'method' => "card",
]),
]),
]);
$result = $client->moneyIn->getpaid($request);
var_dump($result);
```