Back to All

ApiKeys

Ninguna de mis APIKeys funciona. Me dice "Acceso no autorizado".

require_once("../conekta/lib/Conekta.php");
\Conekta\Conekta::setApiKey("aqui va la apikey");
\Conekta\Conekta::setApiVersion("2.0.0");

$order = \Conekta\Order::create(

array(
"line_items" => array(
array(
"name" => "Nombre prueba",
"unit_price" => 20000,
"description" => "Pago en efectivo al comprar en linea",
"quantity" => 2
)
),
"shipping_lines" => array(
array(
"amount" => 20000,
"carrier" => "FEDEX"
)
),
"currency" => "MXN",
"customer_info" => array(
"name" => $cliente,
"email" => $email,
"phone" => "+52" . $telefono
),
"shipping_contact" => array(
"address" => array(
"street1" => "Mexico",
"postal_code" => "76000",
"country" => "MX"
)
),
"metadata" => array("order_number" => $transaccion),
//"pre_authorize" => true,
"charges" => array(
array(
"payment_method" => array(
"type" => "oxxo_cash",
"token_id" => $transaccion
)
)
)
)

);

Esta es la orden que trato de enviar en PHP pero no funciona

Sabe alguien como o cual debe ser la APIKey correcta?