first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
class stEservice {
const POST_URL_PROD = 'https://pay.eservice.com.pl/fim/eservicegate';
const POST_URL_TEST = 'https://testvpos.eservice.com.pl/fim/eservicegate';
const TOKEN_URL_PROD = 'https://pay.eservice.com.pl/pg/token';
const TOKEN_URL_TEST = 'https://testvpos.eservice.com.pl/pg/token';
const PAYMENT_PENDING = 'Pending';
const PAYMENT_APPROVED = 'Approved';
const PAYMENT_DECLINED = 'Declined';
public function __construct() {
$this->config = stPaymentType::getConfiguration(__CLASS__);
}
public function __call($method, $arguments) {
return stPaymentType::call($method, $this->config);
}
public function parseAmount($amount) {
return number_format($amount, 2, '.', '');
}
public function checkPaymentConfiguration() {
return $this->hasEnabled() && $this->hasClientId() && $this->hasPassword() && $this->hasStoreKey();
}
public function getPostUrl() {
return $this->getTest() ? self::POST_URL_TEST : self::POST_URL_PROD;
}
public function getTokenUrl() {
return $this->getTest() ? self::TOKEN_URL_TEST : self::TOKEN_URL_PROD;
}
public function getStoreType() {
return '3d_pay_hosting';
}
}