When I try to make payment it works but paypal doesn't receive money and after a while my payment is cancelled, I really don't know how paypal api works, here is the code:
define('access', 'api');
require_once('api.php');
if (!@include_once(rtrim(str_replace('\\', '/', dirname(__DIR__)), '/') . '/includes/webengine.php')) throw new Exception('Could not load WebEngine.');
$cfg = loadConfigurations('donation.paypal');
if (!is_array($cfg)) {
header("HTTP/1.1 500 Internal Server Error");
die('Invalid configuration format.');
}
$requiredKeys = ['paypal_enable_sandbox', 'paypal_currency', 'paypal_email', 'paypal_title', 'paypal_conversion_rate'];
foreach ($requiredKeys as $key) {
if (!isset($cfg[$key])) {
die("Configuration key missing: $key");
}
}```