-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathaddMerchant.php
118 lines (108 loc) · 5.7 KB
/
addMerchant.php
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
require_once '../vendor/autoload.php';
require_once 'config.php';
try {
$result = \Paynl\Alliance\Merchant::add(
array(
# Required
'companyName' => 'subMerchantName',
'cocNumber' => '54292456',
'street' => 'streetName',
'houseNumber' => '10',
'postalCode' => '1000 AA',
'city' => 'City',
'countryCode' => 'NL', # Available countries: AT, BE, BG, CY, DE, DK, EE, ES, FI, FR, GB, GR, HR, HU, IE, IT, LT, LU, MT, NL, NO, PL, PT, RO, SE & SK
'accounts' => array(
# Atleast 1 account is required. You can add more then one. One account must be primary, the other accounts cannot be primary
array(
# Required
'email' => '[email protected]',
'firstname' => 'Firstname',
'lastname' => 'Lastname',
'gender' => 'male',
'authorisedToSign' => 2, # 0 = Not authorised, 1 = Authorised independently, 2 = Shared authority to sign
'ubo' => 50, # Percentage of shares
'hasAccess' => true, # Allow access to the PAY. admin panel
'useCompanyAuth' => true, # Set to true to grant full company rights
# Optional
'placeOfBirth' => 'City', #
'dateOfBirth' => '09-09-1999', # The date of birth in the following format: d-m-Y
'language' => 'NL' # available languages: NL, FR, EN, FL, DE
),
array(
# Required
'email' => '[email protected]',
'firstname' => 'Co',
'lastname' => 'Owner',
'gender' => 'female',
'authorisedToSign' => 2, # 0 = Not authorised, 1 = Authorised independently, 2 = Shared authority to sign
'ubo' => 25, # Percentage of shares
'hasAccess' => true,
'useCompanyAuth' => false, # All company rights
# Optional
'placeOfBirth' => 'City', #
'dateOfBirth' => '09-09-1999', # The date of birth in the following format: d-m-Y
'language' => 'EN' # available languages: NL, FR, EN, FL, DE
),
array(
# Required
'email' => '[email protected]',
'firstname' => 'Co',
'lastname' => 'Owner1',
'gender' => 'female',
'authorisedToSign' => 2, # 0 = Not authorised, 1 = Authorised independently, 2 = Shared authority to sign
'ubo' => 25, # Percentage of shares
'hasAccess' => false,
'useCompanyAuth' => false, # All company rights
# Optional
'placeOfBirth' => 'City', #
'dateOfBirth' => '09-09-1999', # The date of birth in the following format: d-m-Y
'language' => 'DE' # available languages: NL, FR, EN, FL, DE
),
array(
# Required
'email' => '[email protected]',
'firstname' => 'Co',
'lastname' => 'Owner2',
'gender' => 'female',
'authorisedToSign' => 0, # 0 = Not authorised, 1 = Authorised independently, 2 = Shared authority to sign
'ubo' => false, # Percentage of shares
'hasAccess'=> true,
'useCompanyAuth' => false, # All company rights
# Optional
'placeOfBirth' => 'City', #
'dateOfBirth' => '09-09-1999', # The date of birth in the following format: d-m-Y
'language' => 'FR' # available languages: NL, FR, EN, FL, DE
),
),
# Optional
/*
* So you want to send a registration email to the accounts.
* The options are:
* 0 - No email is sent at all
* 1 - The default registration email is sent with a brief introduction about the partnership
* 2 - The shortened alliance registration email is sent with just login credentials
*/
'sendEmail' => 1,
'bankAccountOwner' => 'Firstname Lastname',
'bankAccountNumber' => 'NL91ABNA0417164300',
'bankAccountBIC' => 'ABNANL2A',
# 'vatNumber' => 'NL807960147B01', # Optional, as there is no VAT relation between Pay.nl and submerchant
'packageName' => 'Alliance', # Alliance or AlliancePlus
# 'referralProfileId' => 'CP-1234-1234', # Allows Pay.nl to load settings of company. Only use this if you have
# been provided a code by pay.nl
/*
* Set to true if you want to be able to debit the balance of this merchant.
* Your invoice may be subtracted from the merchants balance via the Alliance:addInvoice API.
* You need to ask the Merchant permission before setting this value to true
* This also adds an extra line in the generated contract, granting permission to access the balance
* and granting access to the Submerchant's account and statistics
*/
'settleBalance' => true,
'clearingInterval' => 'week' # Options are: day, week, month or manual by using merchant::addClearing API
)
);
echo $result->getMerchantId();
} catch (Exception $e) {
echo "Error occurred: " . $e->getMessage();
}