示例#1
0
 private static function postJson($sp28053d, $sp1f9e9c)
 {
     $sp6a904d = array('http' => array('header' => "Content-Type: application/json\r\n" . "User-Agent: php-context\r\n", 'method' => 'POST', 'content' => json_encode($sp1f9e9c), 'ignore_errors' => true), 'ssl' => array('CN_match' => 'www.culqi.com'));
     $sp8a27ec = stream_context_create($sp6a904d);
     $sp2e826e = file_get_contents($sp28053d, false, $sp8a27ec);
     $sp05128b = Culqi::decifrar($sp2e826e);
     return json_decode($sp05128b, true);
 }
示例#2
0
<?php

require 'culqi.php';
Culqi::$codigoComercio = "demo";
Culqi::$llaveSecreta = "JlhLlpOB5s1aS6upiioJkmdQ0OYZ6HLS2+/o4iYO2MQ=";
Culqi::$servidorBase = 'https://integ-pago.culqi.com';
try {
    $data = Pago::consultar("TICKET");
    var_dump($data);
} catch (InvalidParamsException $e) {
    echo $e->getMessage() . "\n";
}
示例#3
0
 private static function postJson($sp954ec6, $sp821fb9)
 {
     $sp2523af = array('http' => array('header' => "Content-Type: application/json\r\n" . "User-Agent: php-context\r\n", 'method' => 'POST', 'content' => json_encode($sp821fb9), 'ignore_errors' => true));
     $spc35bfb = stream_context_create($sp2523af);
     $spd4bb0a = file_get_contents($sp954ec6, false, $spc35bfb);
     $spbfb5b7 = Culqi::decifrar($spd4bb0a);
     return json_decode($spbfb5b7, true);
 }
示例#4
0
<?php

require 'culqi.php';
Culqi::$codigoComercio = "demo";
Culqi::$llaveSecreta = "JlhLlpOB5s1aS6upiioJkmdQ0OYZ6HLS2+/o4iYO2MQ=";
Culqi::$servidorBase = 'https://integ-pago.culqi.com';
try {
    $inputJSON = file_get_contents('php://input');
    $input = json_decode($inputJSON, TRUE);
    $data = json_decode(Culqi::decifrar($input['respuesta']), TRUE);
    echo json_encode($data);
} catch (InvalidParamsException $e) {
    echo $e->getMessage() . "\n";
}