<?php

require('Openpay/Openpay.php');
include 'getSecrets.php';


$json = file_get_contents('php://input');
$obj = json_decode($json);
// Returns a Json
header('Content-Type: application/json');

$cardNumber = $obj->cardNumber;
$cardOwner = $obj->cardOwner;
$cvc = $obj->cvc;
$monthAndYear = $obj->monthAndYear;


getSecrets();

Openpay::setId($secrets->idOpenpay = $data[0]["openpay_id"]);
Openpay::setApiKey($secrets->pkOpenpay = $data[0]["public_key"]);

Openpay::setProductionMode(true);

$deviceSessionId = OpenPay::getInstance('','','');

$customerData = array(
    'nombre_cliente' => '',
    'email' => '',
    'no_cliente' => '',
    'token_id' => '',
    'deviceSessionId' => '',
    'id_servicio' => '',
    'concepto' => '',
    'nombre_concepto' => '',
    'precio_total' => '',
    'idOpenpay' => '',
    'skOpenpay' => '',
    'db' => ''

)


?>