@@ -19,19 +19,21 @@ function register()
19
19
$ settlementBankAccount = new \Model \SettlementBankAccount ();
20
20
$ settlementBankAccount ->setBranchCode ("1231 " );
21
21
$ settlementBankAccount ->setRoutingNumber ("12 " );
22
+ $ settlementBankAccount ->setBankRegion ("BR " );
22
23
$ settlementBankAccount ->setAccountType (\Model \AccountType::CHECKING );
23
- $ settlementBankAccount ->setAccountHolderTIN ("1213214 " );
24
+ $ settlementBankAccount ->setAccountHolderTIN ("12345678901 " );
24
25
$ settlementBankAccount ->setAccountHolderName ("Timi " );
25
26
$ settlementBankAccount ->setBankAccountNo ("121232141 " );
26
27
$ settlementBankAccount ->setAccountHolderType (\Model \AccountHolderType::ENTERPRISE );
27
28
$ settlementInfo ->setSettlementBankAccount ($ settlementBankAccount );
28
- $ alipayRegisterRequest ->setSettlementInfos ($ settlementInfo );
29
+ $ alipayRegisterRequest ->setSettlementInfos ([ $ settlementInfo] );
29
30
30
31
31
32
$ merchantInfo = new \Model \MerchantInfo ();
32
- $ merchantInfo->
setLoginId (
" wangzunjiao [email protected] ");
33
+ $ merchantInfo->
setLoginId (
round ( microtime ( true ) * 1000 ). " wangzunj3ao [email protected] ");
33
34
$ merchantInfo ->setLegalEntityType (\Model \LegalEntityType::COMPANY );
34
35
36
+
35
37
$ company = new \Model \Company ();
36
38
$ company ->setLegalName ("legalName " );
37
39
$ address = new \Model \Address ();
@@ -44,20 +46,26 @@ function register()
44
46
$ company ->setOperatingAddress ($ address1 );
45
47
46
48
$ attachment = new \Model \Attachment ();
47
- $ attachment ->setAttachmentName ("attachmentName " );
48
- $ attachment ->setAttachmentType (\Model \AttachmentType::ASSOCIATION_ARTICLE );
49
+ $ attachment ->setAttachmentName ("1.jpg " );
50
+ $ attachment ->setFileKey ("test " );
51
+ $ attachment ->setAttachmentType (\Model \AttachmentType::ARTICLES_OF_ASSOCIATION );
52
+ $ attachment1 = new \Model \Attachment ();
53
+ $ attachment1 ->setFileKey ("23423tewgusdhghdsiughsud " );
54
+ $ attachment1 ->setAttachmentType (\Model \AttachmentType::ASSOCIATION_ARTICLE );
55
+ $ attachment1 ->setAttachmentName ("2.jpg " );
49
56
$ company ->setAttachments ([$ attachment ]);
50
57
$ company ->setOperatingAddress ($ address );
58
+
51
59
$ certificate = new \Model \Certificate ();
52
60
$ certificate ->setCertificateNo ("11321421 " );
53
61
$ certificate ->setCertificateType (\Model \CertificateType::ENTERPRISE_REGISTRATION );
54
- $ company ->setCertificates ([ $ certificate] );
62
+ $ company ->setCertificates ($ certificate );
55
63
56
64
$ merchantInfo ->setCompany ($ company );
57
65
$ merchantInfo ->setReferenceMerchantId (round (microtime (true ) * 1000 ));
58
66
59
67
$ businessInfo = new \Model \BusinessInfo ();
60
- $ businessInfo ->setDoingBusinessAs ("DoingBusinessAs " );
68
+ $ businessInfo ->setDoingBusinessAs ("businessName_DBA " );
61
69
$ webSite = new \Model \WebSite ();
62
70
$ webSite ->setUrl ("www.alipay.com " );
63
71
$ businessInfo ->setWebsites ([$ webSite ]);
@@ -66,24 +74,43 @@ function register()
66
74
$ entityAssociations = new \Model \EntityAssociations ();
67
75
$ individual = new \Model \Individual ();
68
76
$ certificate1 = new \Model \Certificate ();
69
- $ certificate1 ->setCertificateNo ("11321421 " );
77
+ $ certificate1 ->setCertificateNo ("11124321421 " );
70
78
$ certificate1 ->setCertificateType (\Model \CertificateType::CPF );
71
79
$ individual ->setCertificates ([$ certificate1 ]);
72
80
$ userName = new \Model \UserName ();
73
81
$ userName ->setFirstName ("firstName " );
82
+ $ userName ->setMiddleName ("middleName " );
74
83
$ userName ->setLastName ("lastName " );
84
+ $ userName ->setFullName ("fullName " );
75
85
$ individual ->setName ($ userName );
76
86
$ individual ->setDateOfBirth ("1990-01-01 " );
77
87
$ entityAssociations ->setIndividual ($ individual );
78
88
$ entityAssociations ->setLegalEntityType (\Model \LegalEntityType::INDIVIDUAL );
89
+ $ entityAssociations ->setAssociationType (\Model \AssociationType::LEGAL_REPRESENTATIVE );
90
+
79
91
80
- $ merchantInfo ->setEntityAssociations ([$ entityAssociations ]);
92
+ $ entityAssociations1 = new \Model \EntityAssociations ();
93
+ $ individual1 = new \Model \Individual ();
94
+ $ certificate2 = new \Model \Certificate ();
95
+ $ certificate2 ->setFileKeys (["wetrewqratewtewgewgewg " ]);
96
+ $ certificate2 ->setCertificateNo ("11321421 " );
97
+ $ certificate2 ->setCertificateType (\Model \CertificateType::CPF );
98
+ $ individual1 ->setCertificates ([$ certificate2 ]);
99
+ $ individual1 ->setName ($ userName );
100
+ $ individual1 ->setDateOfBirth ("1990-01-01 " );
101
+ $ entityAssociations1 ->setIndividual ($ individual1 );
102
+ $ entityAssociations1 ->setLegalEntityType (\Model \LegalEntityType::INDIVIDUAL );
103
+ $ entityAssociations1 ->setAssociationType (\Model \AssociationType::UBO );
104
+
105
+
106
+ $ merchantInfo ->setEntityAssociations ([$ entityAssociations ,$ entityAssociations1 ]);
81
107
82
108
$ alipayRegisterRequest ->setMerchantInfo ($ merchantInfo );
83
109
84
110
$ alipayClient = new DefaultAlipayClient ("https://open-sea-global.alipay.com " , merchantPrivateKey, alipayPublicKey, clientId);
85
111
$ alipayResponse = $ alipayClient ->execute ($ alipayRegisterRequest );
86
112
113
+ printf ($ alipayRegisterRequest ->getMerchantInfo ()->getReferenceMerchantId ());
87
114
echo json_encode ($ alipayResponse );
88
115
89
116
}
@@ -104,7 +131,7 @@ function update($referenceMerchantId)
104
131
$ settlementBankAccount ->setAccountHolderType (\Model \AccountHolderType::ENTERPRISE );
105
132
$ alipaySettlementInfoUpdateRequest ->setSettlementBankAccount ($ settlementBankAccount );
106
133
107
- $ alipayClient = new DefaultAlipayClient ("https://open-sea-global .alipay.com " , merchantPrivateKey, alipayPublicKey, clientId);
134
+ $ alipayClient = new DefaultAlipayClient ("https://open-na .alipay.com " , merchantPrivateKey, alipayPublicKey, clientId);
108
135
$ alipayResponse = $ alipayClient ->execute ($ alipaySettlementInfoUpdateRequest );
109
136
110
137
echo json_encode ($ alipayResponse );
@@ -211,6 +238,6 @@ function createTransfer()
211
238
echo json_encode ($ alipayResponse );
212
239
}
213
240
214
- register ();
215
-
241
+ // register();
242
+ update ( " outmid_wangzunjiao_wzj_20240929_100432_437 " );
216
243
0 commit comments