Skip to content

Commit 1681ac2

Browse files
committed
Add Paylands - MB WAY
1 parent 826ee95 commit 1681ac2

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

samples/init_mbway_apm_payment.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
require_once('config/sample_config.php');
4+
5+
use Craftgate\Model\ApmType;
6+
use Craftgate\Model\Currency;
7+
use Craftgate\Model\PaymentGroup;
8+
use Craftgate\Util\Guid;
9+
10+
$request = array(
11+
'apmType' => ApmType::PAYLANDS_MB_WAY,
12+
'price' => 1,
13+
'paidPrice' => 1,
14+
'currency' => Currency::EUR,
15+
'paymentGroup' => PaymentGroup::LISTING_OR_SUBSCRIPTION,
16+
'conversationId' => 'conversationId',
17+
'externalId' => 'externalId',
18+
'items' => array(
19+
array(
20+
'externalId' => Guid::generate(),
21+
'name' => 'Item 1',
22+
'price' => 0.40
23+
),
24+
array(
25+
'externalId' => Guid::generate(),
26+
'name' => 'Item 2',
27+
'price' => 0.60
28+
)
29+
),
30+
'additionalParams' => array(
31+
'buyerPhoneNumber' => "34700000000",
32+
)
33+
);
34+
35+
$response = SampleConfig::craftgate()->payment()->initApmPayment($request);
36+
37+
print_r($response);

src/Model/ApmType.php

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class ApmType
3535
const VODAFONE_DCB = "VODAFONE_DCB";
3636
const PAYMOB = "PAYMOB";
3737
const BIZUM = "BIZUM";
38+
const PAYLANDS_MB_WAY = "PAYLANDS_MB_WAY";
3839
const PAYCELL_DCB = "PAYCELL_DCB";
3940
const IWALLET = "IWALLET";
4041
const FUND_TRANSFER = 'FUND_TRANSFER';

src/Model/PaymentProvider.php

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class PaymentProvider
3838
const VODAFONE = "VODAFONE";
3939
const PAYMOB = "PAYMOB";
4040
const BIZUM = "BIZUM";
41+
const PAYLANDS_MB_WAY = "PAYLANDS_MB_WAY";
4142
const PAYCELL_DCB = "PAYCELL_DCB";
4243
const IWALLET = "IWALLET";
4344
const OFFLINE = "OFFLINE";

0 commit comments

Comments
 (0)