Pix Lib and Validations #2

Merged
bacarin merged 32 commits from bacarin/phpkore:master into master 2025-07-11 18:33:17 +00:00
Showing only changes of commit 44e9ac4f34 - Show all commits

View file

@ -2,20 +2,19 @@
namespace Kontrl\PhpKore; namespace Kontrl\PhpKore;
include_once(__DIR__.'/rules.php');
class Pix extends Kore class Pix extends Kore
{ {
public function newPixCharge($amount, $pix_key) public function pixCobrancaImediata($payload)
{ {
$payload = [
'amount' => $amount,
'pix_key' => $pix_key
];
return curlRequest( return curlRequest(
'https://httpbin.org/post', 'https://httpbin.org/post',
'POST', 'POST',
[], [],
[ [
'x-kore-drone-uid: drone:f8f19d43660d7bbdd2c63d428de6d7b1ff33554311adbe35c784b0584aa007fd', 'x-kore-drone-uid: drone:' . $this->drone,
'x-kore-drone-sign: ' . $this->signBody($payload) 'x-kore-drone-sign: ' . $this->signBody($payload)
], ],
$payload $payload