1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Loevgaard\DandomainAltapayBundle\Tests\PayloadGenerator\Fixture; |
4
|
|
|
|
5
|
|
|
use Loevgaard\AltaPay\Payload\OrderLine as OrderLinePayload; |
6
|
|
|
use Loevgaard\AltaPay\Payload\PaymentRequest\Config as ConfigPayload; |
7
|
|
|
use Loevgaard\AltaPay\Payload\PaymentRequest\CustomerInfo as CustomerInfoPayload; |
8
|
|
|
use Loevgaard\DandomainAltapayBundle\PayloadGenerator\PaymentRequestPayloadGenerator; |
9
|
|
|
use Money\Money; |
10
|
|
|
|
11
|
|
|
final class Gateway extends PaymentRequestPayloadGenerator |
12
|
|
|
{ |
13
|
|
|
public function createOrderLine( |
14
|
|
|
string $description, |
15
|
|
|
string $itemId, |
16
|
|
|
string $quantity, |
17
|
|
|
Money $unitPrice, |
18
|
|
|
float $taxPercent = null, |
19
|
|
|
string $goodsType = null |
20
|
|
|
): OrderLinePayload { |
21
|
|
|
return parent::createOrderLine($description, $itemId, $quantity, $unitPrice, $taxPercent, |
22
|
|
|
$goodsType); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
public function createCustomerInfo( |
26
|
|
|
string $billingFirstName, |
27
|
|
|
string $billingLastName, |
28
|
|
|
string $billingAddress, |
29
|
|
|
string $billingPostal, |
30
|
|
|
string $billingCity, |
31
|
|
|
string $billingCountry, |
32
|
|
|
string $shippingFirstName, |
33
|
|
|
string $shippingLastName, |
34
|
|
|
string $shippingAddress, |
35
|
|
|
string $shippingPostal, |
36
|
|
|
string $shippingCity, |
37
|
|
|
string $shippingCountry |
38
|
|
|
): CustomerInfoPayload { |
39
|
|
|
return parent::createCustomerInfo($billingFirstName, $billingLastName, $billingAddress, $billingPostal, |
40
|
|
|
$billingCity, $billingCountry, $shippingFirstName, $shippingLastName, $shippingAddress, $shippingPostal, |
41
|
|
|
$shippingCity, $shippingCountry); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function createConfig( |
45
|
|
|
string $callbackForm, |
46
|
|
|
string $callbackOk, |
47
|
|
|
string $callbackFail, |
48
|
|
|
string $callbackRedirect, |
49
|
|
|
string $callbackOpen, |
50
|
|
|
string $callbackNotification |
51
|
|
|
): ConfigPayload { |
52
|
|
|
return parent::createConfig($callbackForm, $callbackOk, $callbackFail, $callbackRedirect, $callbackOpen, |
53
|
|
|
$callbackNotification); |
54
|
|
|
} |
55
|
|
|
} |
56
|
|
|
|