commit melhorias sgf

This commit is contained in:
2026-11-11 09:00:17 +02:00
parent 0b05a1192c
commit 1d11a5e57b
736 changed files with 40746 additions and 210 deletions
+9
View File
@@ -0,0 +1,9 @@
<?php
// Parent is the SGC application. Do not let its server-adapter cache/DB variables
// shadow the receiver harness's explicit isolated environment.
foreach(array_keys($_SERVER)as$key)if(preg_match('/^(APP_|DB_|SGF_|SESSION_|CACHE_|QUEUE_|BCRYPT_)/',$key))unset($_SERVER[$key]);
require __DIR__.'/sgc-invoice-proof-bootstrap.php';
$input=json_decode(file_get_contents($proofRoot.'/'.basename($argv[1])),true,128,JSON_THROW_ON_ERROR);
$headers=[];foreach(['Authorization'=>'HTTP_AUTHORIZATION','X-SGC-Client'=>'HTTP_X_SGC_CLIENT','X-SGC-Context'=>'HTTP_X_SGC_CONTEXT']as$from=>$to)$headers[$to]=$input['headers'][$from]??null;
$r=$send($input['body']??[],$input['headers']['X-Idempotency-Key']??null,$headers,$input['path'],null,$input['method']);
file_put_contents($proofRoot.'/'.basename($argv[2]),json_encode($r,JSON_THROW_ON_ERROR));