Skip to content

agustinprod/sermepa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sermepa Build Status

PHP Sermepa payments utility

Usage

use Killgt\Sermepa\Request;

$fuc = "999008881";
$key = "Mk9m98IfEblmPfrpsawt7BmxObt98Jev";
$useProductionEnviroment = false;
$terminal = "871";
$businessName = "Massive Dynamic";

$request = new Killgt\Sermepa\Request($fuc, $key, $useProductionEnviroment, $terminal, $businessName);

$request->setAmount(45.54);
$request->setOrder('2014abcd1234');
$request->setTransactionType(0);
$request->setCallbackURL('http://example.com/callback');
$request->setSuccessURL('http://example.com/ok');
$request->setErrorURL('http://example.com/error');
$request->setPayer('Peter Bishop');
$request->setProductDescription('The machine');

echo $request->render(); //outputs the form and auto-submit

Checking the callback

$request = new Killgt\Sermepa\Request;
$request->setKey($key);

if ($response = $request->checkCallback($_POST)) {
	// Get $response['Ds_Order'] and update your order
} else {
	// Something went wrong
}

About

PHP Sermepa payments utility

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages