forked from codenitive/laravel-molpay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.php
49 lines (43 loc) · 1.18 KB
/
start.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
Autoloader::namespaces(array(
'Molpay' => Bundle::path('molpay').'libraries',
));
Autoloader::map(array(
'Molpay\\Transaction' => Bundle::path('molpay').'models/transaction'.EXT,
));
/*
|--------------------------------------------------------------------------
| On Payment Received
|--------------------------------------------------------------------------
|
| Trigger an event when payment is made by client.
|
*/
Event::listen('molpay.checkout.paid', function ($order_id)
{
// Transaction paid and done.
});
/*
|--------------------------------------------------------------------------
| On Payment Failed
|--------------------------------------------------------------------------
|
| Trigger an event when payment is marked as failed.
|
*/
Event::listen('molpay.checkout.failed', function ($order_id, $status)
{
// Transaction is failed
});
/*
|--------------------------------------------------------------------------
| On Payment Pending
|--------------------------------------------------------------------------
|
| Trigger an event when payment is marked as pending.
|
*/
Event::listen('molpay.checkout.pending', function ($order_id, $status)
{
// Transaction is pending
});