Getting available methods
In this payment gateway, user will select preferred payment option directly in payment gateway and NOT in eshop. Therefor you want to inform customer about available payment methods and show different text or image based on certain conditions like:
- currency
- total amount
- country
For this purpose you can retrieve available payment methods with this helper:
<?php
use Tatrapayplus\TatrapayplusApiClient\Api\TatraPayPlusAPIApi;
$tatrapayplus_api = new TatraPayPlusAPIApi(
"your-client-id",
"your-client-secret",
);
$available_methods = $tatrapayplus_api->getAvailableMethods(
total_amount: 100,
currency: "EUR",
country: "SK"
);
Based on response from these functions you should display info to the user about available methods, and then you should create payment.