Last active
August 24, 2018 19:43
-
-
Save iDavidMorales/3ea97c0f3236777c370c4737d42d2e5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
header('Access-Control-Allow-Origin: *'); | |
//require_once("lib/Conekta.php"); | |
require_once("conekta-php/lib/Conekta.php"); | |
\Conekta\Conekta::setApiKey("XXXXX"); | |
\Conekta\Conekta::setApiVersion("4.0.0"); | |
//$token_id=$_POST['token']; | |
\Conekta\Conekta\Order::create(array( | |
'currency' => 'MXN', | |
'customer_info' => array( | |
'customer_id' => 'cus_2j9UeJE73wr4v3rrP' | |
), | |
'line_items' => array( | |
array( | |
'name' => 'Box of Cohiba S1s', | |
'unit_price' => 35000, | |
'quantity' => 1 | |
) | |
), | |
'charges' => array( | |
array( | |
'payment_method' => array( | |
'type' => 'default' | |
) | |
) | |
) | |
)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment