1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Http\Controllers\LaravelMobilpay; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use Illuminate\Http\Request; |
7
|
|
|
use Netopia\Payment\Request\Card; |
8
|
|
|
use Netopia\Payment\Request\PaymentAbstract; |
9
|
|
|
use Stl30\LaravelMobilpay\Mobilpay\Payment\Request\Mobilpay_Payment_Request_Abstract; |
10
|
|
|
use Stl30\LaravelMobilpay\Mobilpay\Payment\Request\Mobilpay_Payment_Request_Card; |
11
|
|
|
|
12
|
|
|
class LaravelMobilpayController extends \Stl30\LaravelMobilpay\Http\Controllers\LaravelMobilpayController |
13
|
|
|
{ |
14
|
|
|
public function card() |
15
|
|
|
{ |
16
|
|
|
return parent::card(); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
public function addTransaction(Card $mobilpayRequestObject, $customDataParameter = '') |
20
|
|
|
{ |
21
|
|
|
return parent::addTransaction($mobilpayRequestObject, $customDataParameter); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
public function updateTransaction(PaymentAbstract $mobilpayReturnObject, $orderStatus = 'possible error') |
25
|
|
|
{ |
26
|
|
|
return parent::updateTransaction($mobilpayReturnObject, $orderStatus); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
function addAutomatedTransactionError($errorCode, $errorType, $errorMessage, $mobilpayReturnObject) |
|
|
|
|
30
|
|
|
{ |
31
|
|
|
return parent::addAutomatedTransactionError($errorCode, $errorType, $errorMessage, $mobilpayReturnObject); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
public static function validatePaymentDetails(array $parameters = []) |
35
|
|
|
{ |
36
|
|
|
return parent::validatePaymentDetails($parameters); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function cardRedirect(array $paymentParameters = array()) |
40
|
|
|
{ |
41
|
|
|
return parent::cardRedirect($paymentParameters); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function cardConfirm() |
45
|
|
|
{ |
46
|
|
|
return parent::cardConfirm(); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function cardReturn(Request $request) |
50
|
|
|
{ |
51
|
|
|
return parent::cardReturn($request); |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
|
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.