-
Notifications
You must be signed in to change notification settings - Fork 17
/
pagseguro.php
36 lines (27 loc) · 874 Bytes
/
pagseguro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once DIR_SYSTEM . 'library/PagSeguro/vendor/autoload.php';
use ValdeirPsr\PagSeguro\Domains\Environment;
use ValdeirPsr\PagSeguro\Request\Session;
class ModelExtensionPaymentPagSeguro extends Model
{
const EXTENSION_PREFIX = 'payment_pagseguro_';
public function getMethod($address, $total)
{
return [];
}
/**
* Gera uma nova sessão para o pedido
*/
public function generateSession(): string
{
}
private function factoryEnvironment(): Environment
{
$email = $this->config->get(self::EXTENSION_PREFIX . 'email');
$token = $this->config->get(self::EXTENSION_PREFIX . 'token');
if ($this->config->get(self::EXTENSION_PREFIX . 'sandbox')) {
return Environment::sandbox($email, $token);
}
return Environment::production($email, $token);
}
}