From 44e9ac4f3464650978f2f90ad74f756c5c0816ef Mon Sep 17 00:00:00 2001 From: Eduardo Bacarin Date: Thu, 3 Jul 2025 17:13:51 -0300 Subject: [PATCH] =?UTF-8?q?add=20main=20parameters=20to=20pixCobran=C3=A7a?= =?UTF-8?q?Imediata=20function=20on=20Pix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Pix.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Pix.php b/src/Pix.php index e9c49f0..0e688a4 100644 --- a/src/Pix.php +++ b/src/Pix.php @@ -2,20 +2,19 @@ namespace Kontrl\PhpKore; +include_once(__DIR__.'/rules.php'); + class Pix extends Kore { - public function newPixCharge($amount, $pix_key) + public function pixCobrancaImediata($payload) { - $payload = [ - 'amount' => $amount, - 'pix_key' => $pix_key - ]; + return curlRequest( 'https://httpbin.org/post', 'POST', [], [ - 'x-kore-drone-uid: drone:f8f19d43660d7bbdd2c63d428de6d7b1ff33554311adbe35c784b0584aa007fd', + 'x-kore-drone-uid: drone:' . $this->drone, 'x-kore-drone-sign: ' . $this->signBody($payload) ], $payload