-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathBanking.php
More file actions
67 lines (55 loc) · 2.1 KB
/
Copy pathBanking.php
File metadata and controls
67 lines (55 loc) · 2.1 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/*
* NOTICE OF LICENSE
*
* This source file is subject to the MIT License
* It is available through the world-wide-web at this URL:
* https://tldrlegal.com/license/mit-license
* If you are unable to obtain it through the world-wide-web, please send an email
* to support@buckaroo.nl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please contact support@buckaroo.nl for more information.
*
* @copyright Copyright (c) Buckaroo B.V.
* @license https://tldrlegal.com/license/mit-license
*/
declare(strict_types=1);
namespace Buckaroo\PaymentMethods\Banking;
use Buckaroo\Models\Model;
use Buckaroo\PaymentMethods\Banking\Models\InstantPaymentOrder;
use Buckaroo\PaymentMethods\Banking\Models\PaymentOrder;
use Buckaroo\PaymentMethods\Banking\Models\PaymentOrderPayload;
use Buckaroo\PaymentMethods\Banking\Service\ParameterKeys\PaymentOrderAdapter;
use Buckaroo\PaymentMethods\PayablePaymentMethod;
use Buckaroo\Transaction\Response\TransactionResponse;
class Banking extends PayablePaymentMethod
{
/**
* @var string
*/
protected string $paymentName = 'Banking';
/**
* @return TransactionResponse
*/
public function paymentOrder(?Model $model = null): TransactionResponse
{
$paymentOrderPayload = new PaymentOrderPayload($this->payload);
$this->request->setPayload($paymentOrderPayload);
$this->setServiceList('PaymentOrder', $model ?? new PaymentOrderAdapter(new PaymentOrder($this->payload)));
return $this->postRequest();
}
/**
* @return TransactionResponse
*/
public function instantPaymentOrder(?Model $model = null): TransactionResponse
{
$paymentOrderPayload = new PaymentOrderPayload($this->payload);
$this->request->setPayload($paymentOrderPayload);
$this->setServiceList('InstantPaymentOrder', $model ?? new PaymentOrderAdapter(new InstantPaymentOrder($this->payload)));
return $this->postRequest();
}
}