| Package Data | |
|---|---|
| Maintainer Username: | teepluss |
| Maintainer Contact: | admin@laravel.in.th (Teepluss) |
| Package Create Date: | 2013-10-21 |
| Package Last Update: | 2015-06-30 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-28 03:01:56 |
| Package Statistics | |
|---|---|
| Total Downloads: | 125 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 4 |
| Total Watchers: | 4 |
| Total Forks: | 1 |
| Total Open Issues: | 1 |
Epay is deprecated. Please use the Gateway
Epay is payment gateway adapters.
To get the lastest version of Epay simply require it in your composer.json file.
"teepluss/epay": "dev-master"
You'll then need to run composer install to download it and have the autoloader updated.
Once Epay is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key.
'providers' => array(
'Teepluss\Epay\EpayServiceProvider'
)
Epay also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your app/config/app.php file.
'aliases' => array(
'Epay' => 'Teepluss\Epay\Facades\Epay'
)
Generate payment form.
$adapter = Epay::factory('paypal');
$adapter->setSandboxMode(true);
$adapter->setSuccessUrl('http://www.domain/foreground/success')
->setCancelUrl('http://www.domain/foreground/cancel')
->setBackendUrl('http://www.domain/background/invoice/00001');
$adapter->setMerchantAccount('demo@gmail.com');
$adapter->setLanguage('TH')
->setCurrency('THB');
$adapter->setInvoice(00001)
->setPurpose('Buy a beer.')
->setAmount(100);
$adapter->setRemark('Short note');
$generated = $adapter->render();
var_dump($generated);
Checking foregound process.
$adapter = Epay::factory('paypal');
$adapter->setSandboxMode(true);
$adapter->setMerchantAccount('demo@gmail.com');
$adapter->setInvoice(00001);
$result = $adapter->getFrontendResult();
var_dump($result);
Checking background process (IPN)
$adapter = Epay::factory('paypal');
$adapter->setSandboxMode(true);
$adapter->setMerchantAccount('demo@gmail.com');
$adapter->setInvoice(00001);
$result = $adapter->getBackendResult();
var_dump($result);
If you have some problem, Contact teepluss@gmail.com