Skip to content

Commit 2ccf5b5

Browse files
Merge pull request #115 from sveawebpay/release/3.15.0
New payment methods
2 parents 15a7a42 + 9ee8e96 commit 2ccf5b5

File tree

9 files changed

+44
-7
lines changed

9 files changed

+44
-7
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "sveaekonomi/webpay",
33
"version": "3.14.1",
4-
"description": "Php integration library for Svea Ekonomis payment methods",
4+
"description": "Php integration library for Svea payment methods",
55
"license": "Apache-2.0",
66
"authors": [
77
{
8-
"name": "Svea Ekonomi AB",
8+
"name": "Svea Bank AB",
99
"email": "[email protected]"
1010
}
1111
],

src/Constant/PaymentMethod.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ abstract class PaymentMethod
2727
const SHB_FI = 'DBSHBFI';
2828
const SPANKKI_FI = 'DBSPANKKIFI';
2929
const SWEDBANK_SE = 'DBSWEDBANKSE';
30-
const TAPIOLA_FI = 'DBTAPIOLAFI';
31-
const SWISH = 'SWISH';
30+
const TAPIOLA_FI = 'DBTAPIOLAFI';
3231

3332
//PaymentMethodType::CARD
3433
const KORTCERT = 'KORTCERT';
@@ -43,4 +42,10 @@ abstract class PaymentMethod
4342
//PSP
4443
const PAYGROUND = 'PAYGROUND';
4544
const PAYPAL = 'PAYPAL';
45+
46+
const MOBILEPAY = 'MOBILEPAY';
47+
const SWISH = 'SWISH';
48+
const SWISH_PF = 'SWISH_PF';
49+
const VIPPS = 'VIPPS';
50+
const TRUSTLY = 'TRUSTLY';
4651
}

src/HostedService/Helper/HostedXmlBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ public function getPreparePaymentXML($request, $order)
334334
$this->XMLWriter->writeElement("iscompany", $this->isCompany); // -- used by invoice payment
335335
$this->XMLWriter->writeElement("addinvoicefee", "FALSE"); // -- used by invoice payment
336336
// addressid // -- used by invoice payment
337+
338+
if (isset($request['payerAlias'])) {
339+
$this->XMLWriter->writeElement("payeralias", $request['payerAlias']);
340+
}
337341

338342
$this->XMLWriter->endElement();
339343
$this->XMLWriter->endDocument();

src/HostedService/HostedResponse/HostedAdminResponse/HostedAdminResponse.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function __construct($message, $countryCode, $config)
3333
$this->config = $config;
3434

3535
if (is_object($message)) {
36-
3736
if (isset($message->mac) && isset($message->message)) {
3837
$decodedXml = base64_decode($message->message);
3938
$secret = $config->getSecret(ConfigurationProvider::HOSTED_TYPE, $countryCode);

src/HostedService/HostedResponse/HostedResponse.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,15 @@ protected function setErrorParams($resultcode)
409409
break;
410410
}
411411
}
412+
413+
/**
414+
* Allow dynamic access to response attributes
415+
*
416+
* @param string $name
417+
* @return mixed
418+
*/
419+
public function __get($name)
420+
{
421+
return $this->$name;
422+
}
412423
}

src/WebService/WebServiceResponse/GetAddressesResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
class GetAddressesResponse extends WebServiceResponse
3737
{
3838
/**
39-
* @var $customerIdentity - GetAddressIdentity array of GetAddressIdentity
39+
* @var array - GetAddressIdentity array of GetAddressIdentity
4040
*/
4141
public $customerIdentity = array();
4242

src/WebService/WebServiceResponse/PaymentPlanParamsResponse.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ class PaymentPlanParamsResponse extends WebServiceResponse
3939
*/
4040
public $campaignCodes = array();
4141

42+
/**
43+
* Country
44+
*
45+
* @var string
46+
*/
47+
public $country;
48+
4249
/**
4350
* PaymentPlanParamsResponse constructor.
4451
* @param $response

src/WebService/WebServiceResponse/WebServiceResponse.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,15 @@ abstract class WebServiceResponse
3030
* @var array $logs Raw HTTP request / response logs
3131
*/
3232
public $logs;
33+
34+
/**
35+
* Allow dynamic access to response attributes
36+
*
37+
* @param string $name
38+
* @return mixed
39+
*/
40+
public function __get($name)
41+
{
42+
return $this->$name;
43+
}
3344
}

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "3.14.1"
2+
"version": "3.15.0"
33
}

0 commit comments

Comments
 (0)