Código PHP:
require(dirname(__FILE__).'/sci/sci/EgoPaySci.php');
try
{
$oEgopay = new EgoPaySciCallback(array(
'store_id' => 'xxxxxxxxxxxxx',
'store_password' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
));
$aResponse = $oEgopay->getResponse($_POST);
$aResponse = array();
$item_number = $aResponse['cf_1'];
$payment_status = $aResponse['sStatus'];
$transaction_type = $aResponse['sType'];
$txn_id = $aResponse['sId'];
$payer_id = $aResponse['sEmail'];
$gross_total = $aResponse['fAmount'];
$mc_currency = $aResponse['sCurrency'];
$payer_name = $aResponse['sEmail'];
$payer_email = $aResponse['sEmail'];
if ($payment_status == 'TEST SUCCESS') {
include "config.php";
$to = "[email protected]";
$subject = "Se enviaron los datos del IPN";
$message = "Hola, los datos del IPN se enviaron, son los siguientes:\n\nPayer ID: $sid\nTotal: $gross_total\nPayer Name: $cf_1\nPayer Email: $datos\nS ID: $txn_id Transaction Type: $transaction_type\n\nEso es todo\n\nBest Regards\nIPN Test";
$from = "TestMail <[email protected]>";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
//Note: To check if payment was not made in test mode and is completed,
//you have to make sure that sStatus equals to 'Completed'
//@todo: check if order amount and currency is valid
//@todo: check your order status
}
}
catch(EgoPayException $e)
{
die($e->getMessage());
}
Alguien me puede ayudar diciendome que le hace falta a esto...
Gracias de ante mano.