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
|
|
|
|
10
|
|
|
final class Gateway extends PaymentRequestPayloadGenerator |
11
|
|
|
{ |
12
|
|
|
public function createOrderLine( |
13
|
|
|
string $description, |
14
|
|
|
string $itemId, |
15
|
|
|
string $quantity, |
16
|
|
|
float $unitPrice, |
17
|
|
|
float $taxPercent = null, |
18
|
|
|
string $goodsType = null |
19
|
|
|
): OrderLinePayload { |
20
|
|
|
return parent::createOrderLine($description, $itemId, $quantity, $unitPrice, $taxPercent, |
21
|
|
|
$goodsType); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
public function createCustomerInfo( |
25
|
|
|
string $billingFirstName, |
26
|
|
|
string $billingLastName, |
27
|
|
|
string $billingAddress, |
28
|
|
|
string $billingPostal, |
29
|
|
|
string $billingCity, |
30
|
|
|
string $billingCountry, |
31
|
|
|
string $shippingFirstName, |
32
|
|
|
string $shippingLastName, |
33
|
|
|
string $shippingAddress, |
34
|
|
|
string $shippingPostal, |
35
|
|
|
string $shippingCity, |
36
|
|
|
string $shippingCountry |
37
|
|
|
): CustomerInfoPayload { |
38
|
|
|
return parent::createCustomerInfo($billingFirstName, $billingLastName, $billingAddress, $billingPostal, |
39
|
|
|
$billingCity, $billingCountry, $shippingFirstName, $shippingLastName, $shippingAddress, $shippingPostal, |
40
|
|
|
$shippingCity, $shippingCountry); |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function createConfig( |
44
|
|
|
string $callbackForm, |
45
|
|
|
string $callbackOk, |
46
|
|
|
string $callbackFail, |
47
|
|
|
string $callbackRedirect, |
48
|
|
|
string $callbackOpen, |
49
|
|
|
string $callbackNotification |
50
|
|
|
): ConfigPayload { |
51
|
|
|
return parent::createConfig($callbackForm, $callbackOk, $callbackFail, $callbackRedirect, $callbackOpen, |
52
|
|
|
$callbackNotification); |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|