Created
October 18, 2013 19:14
-
-
Save filipecrosk/7046615 to your computer and use it in GitHub Desktop.
Post/Get to Komerci/Redecard
This file contains hidden or 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
<?php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "https://ecommerce.redecard.com.br/pos_virtual/wskomerci/cap_teste.asmx"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_POST, true); | |
$data = array( | |
'TOTAL' => "1.00", | |
'TRANSACAO' => "04", | |
'PARCELAS' => "00", | |
'FILIACAO' => "046455841", | |
'NUMPEDIDO' => "123", | |
'NRCARTAO' => "5555666677778884", | |
'CVC2' => "123", | |
'MES' => "01", | |
'ANO' => "16", | |
'PORTADOR' => "NOME DO CLIENTE", | |
'IATA' => "", | |
'DISTRIBUIDOR' => "", | |
'CONCENTRADOR' => "", | |
'TAXAEMBARQUE' => "", | |
'ENTRADA' => "", | |
'NUMDOC1' => "", | |
'NUMDOC2' => "", | |
'NUMDOC3' => "", | |
'NUMDOC4' => "", | |
'PAX1' => "", | |
'PAX2' => "", | |
'PAX3' => "", | |
'PAX4' => "", | |
'CONFTXN' => "S", | |
'ADD_Data' => "" | |
); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
$output = curl_exec($ch); | |
$info = curl_getinfo($ch); | |
curl_close($ch); | |
echo $output; | |
echo "---------------------------------------------"; | |
print_r($info); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment