1 | <?php |
||
2 | /** |
||
3 | * This file aims to show you how to use this generated package. |
||
4 | * In addition, the goal is to show which methods are available and the first needed parameter(s) |
||
5 | * You have to use an associative array such as: |
||
6 | * - the key must be a constant beginning with WSDL_ from AbstractSoapClientBase class (each generated ServiceType class extends this class) |
||
7 | * - the value must be the corresponding key value (each option matches a {@link http://www.php.net/manual/en/soapclient.soapclient.php} option) |
||
8 | * $options = array( |
||
9 | * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl', |
||
10 | * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true, |
||
11 | * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login', |
||
12 | * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password', |
||
13 | * ); |
||
14 | * etc... |
||
15 | */ |
||
16 | require_once __DIR__ . '/vendor/autoload.php'; |
||
17 | /** |
||
18 | * Minimal options |
||
19 | */ |
||
20 | $options = array( |
||
21 | \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl', |
||
22 | \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => \PayPal\ClassMap::get(), |
||
23 | ); |
||
24 | /** |
||
25 | * Samples for Refund ServiceType |
||
26 | */ |
||
27 | $refund = new \PayPal\ServiceType\Refund($options); |
||
28 | $refund->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
29 | /** |
||
30 | * Sample call for RefundTransaction operation/method |
||
31 | */ |
||
32 | if ($refund->RefundTransaction(new \PayPal\StructType\RefundTransactionReq()) !== false) { |
||
33 | print_r($refund->getResult()); |
||
34 | } else { |
||
35 | print_r($refund->getLastError()); |
||
36 | } |
||
37 | /** |
||
38 | * Samples for Initiate ServiceType |
||
39 | */ |
||
40 | $initiate = new \PayPal\ServiceType\Initiate($options); |
||
41 | $initiate->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
42 | /** |
||
43 | * Sample call for InitiateRecoup operation/method |
||
44 | */ |
||
45 | if ($initiate->InitiateRecoup(new \PayPal\StructType\InitiateRecoupReq()) !== false) { |
||
46 | print_r($initiate->getResult()); |
||
47 | } else { |
||
48 | print_r($initiate->getLastError()); |
||
49 | } |
||
50 | /** |
||
51 | * Samples for Complete ServiceType |
||
52 | */ |
||
53 | $complete = new \PayPal\ServiceType\Complete($options); |
||
54 | $complete->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
55 | /** |
||
56 | * Sample call for CompleteRecoup operation/method |
||
57 | */ |
||
58 | if ($complete->CompleteRecoup(new \PayPal\StructType\CompleteRecoupReq()) !== false) { |
||
59 | print_r($complete->getResult()); |
||
60 | } else { |
||
61 | print_r($complete->getLastError()); |
||
62 | } |
||
63 | /** |
||
64 | * Samples for Cancel ServiceType |
||
65 | */ |
||
66 | $cancel = new \PayPal\ServiceType\Cancel($options); |
||
67 | $cancel->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
68 | /** |
||
69 | * Sample call for CancelRecoup operation/method |
||
70 | */ |
||
71 | if ($cancel->CancelRecoup(new \PayPal\StructType\CancelRecoupReq()) !== false) { |
||
72 | print_r($cancel->getResult()); |
||
73 | } else { |
||
74 | print_r($cancel->getLastError()); |
||
75 | } |
||
76 | /** |
||
77 | * Samples for Get ServiceType |
||
78 | */ |
||
79 | $get = new \PayPal\ServiceType\Get($options); |
||
80 | $get->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
81 | /** |
||
82 | * Sample call for GetTransactionDetails operation/method |
||
83 | */ |
||
84 | if ($get->GetTransactionDetails(new \PayPal\StructType\GetTransactionDetailsReq()) !== false) { |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
85 | print_r($get->getResult()); |
||
86 | } else { |
||
87 | print_r($get->getLastError()); |
||
88 | } |
||
89 | /** |
||
90 | * Sample call for GetBoardingDetails operation/method |
||
91 | */ |
||
92 | if ($get->GetBoardingDetails(new \PayPal\StructType\GetBoardingDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
93 | print_r($get->getResult()); |
||
94 | } else { |
||
95 | print_r($get->getLastError()); |
||
96 | } |
||
97 | /** |
||
98 | * Sample call for GetMobileStatus operation/method |
||
99 | */ |
||
100 | if ($get->GetMobileStatus(new \PayPal\StructType\GetMobileStatusReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
101 | print_r($get->getResult()); |
||
102 | } else { |
||
103 | print_r($get->getLastError()); |
||
104 | } |
||
105 | /** |
||
106 | * Sample call for GetBalance operation/method |
||
107 | */ |
||
108 | if ($get->GetBalance(new \PayPal\StructType\GetBalanceReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
109 | print_r($get->getResult()); |
||
110 | } else { |
||
111 | print_r($get->getLastError()); |
||
112 | } |
||
113 | /** |
||
114 | * Sample call for GetPalDetails operation/method |
||
115 | */ |
||
116 | if ($get->GetPalDetails(new \PayPal\StructType\GetPalDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
117 | print_r($get->getResult()); |
||
118 | } else { |
||
119 | print_r($get->getLastError()); |
||
120 | } |
||
121 | /** |
||
122 | * Sample call for GetAuthDetails operation/method |
||
123 | */ |
||
124 | if ($get->GetAuthDetails(new \PayPal\StructType\GetAuthDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
125 | print_r($get->getResult()); |
||
126 | } else { |
||
127 | print_r($get->getLastError()); |
||
128 | } |
||
129 | /** |
||
130 | * Sample call for GetAccessPermissionDetails operation/method |
||
131 | */ |
||
132 | if ($get->GetAccessPermissionDetails(new \PayPal\StructType\GetAccessPermissionDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
133 | print_r($get->getResult()); |
||
134 | } else { |
||
135 | print_r($get->getLastError()); |
||
136 | } |
||
137 | /** |
||
138 | * Sample call for GetIncentiveEvaluation operation/method |
||
139 | */ |
||
140 | if ($get->GetIncentiveEvaluation(new \PayPal\StructType\GetIncentiveEvaluationReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
141 | print_r($get->getResult()); |
||
142 | } else { |
||
143 | print_r($get->getLastError()); |
||
144 | } |
||
145 | /** |
||
146 | * Sample call for GetExpressCheckoutDetails operation/method |
||
147 | */ |
||
148 | if ($get->GetExpressCheckoutDetails(new \PayPal\StructType\GetExpressCheckoutDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
149 | print_r($get->getResult()); |
||
150 | } else { |
||
151 | print_r($get->getLastError()); |
||
152 | } |
||
153 | /** |
||
154 | * Sample call for GetBillingAgreementCustomerDetails operation/method |
||
155 | */ |
||
156 | if ($get->GetBillingAgreementCustomerDetails(new \PayPal\StructType\GetBillingAgreementCustomerDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
157 | print_r($get->getResult()); |
||
158 | } else { |
||
159 | print_r($get->getLastError()); |
||
160 | } |
||
161 | /** |
||
162 | * Sample call for GetRecurringPaymentsProfileDetails operation/method |
||
163 | */ |
||
164 | if ($get->GetRecurringPaymentsProfileDetails(new \PayPal\StructType\GetRecurringPaymentsProfileDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
165 | print_r($get->getResult()); |
||
166 | } else { |
||
167 | print_r($get->getLastError()); |
||
168 | } |
||
169 | /** |
||
170 | * Samples for BMC ServiceType |
||
171 | */ |
||
172 | $bMC = new \PayPal\ServiceType\BMC($options); |
||
173 | $bMC->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
174 | /** |
||
175 | * Sample call for BMCreateButton operation/method |
||
176 | */ |
||
177 | if ($bMC->BMCreateButton(new \PayPal\StructType\BMCreateButtonReq()) !== false) { |
||
178 | print_r($bMC->getResult()); |
||
179 | } else { |
||
180 | print_r($bMC->getLastError()); |
||
181 | } |
||
182 | /** |
||
183 | * Samples for BMU ServiceType |
||
184 | */ |
||
185 | $bMU = new \PayPal\ServiceType\BMU($options); |
||
186 | $bMU->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
187 | /** |
||
188 | * Sample call for BMUpdateButton operation/method |
||
189 | */ |
||
190 | if ($bMU->BMUpdateButton(new \PayPal\StructType\BMUpdateButtonReq()) !== false) { |
||
191 | print_r($bMU->getResult()); |
||
192 | } else { |
||
193 | print_r($bMU->getLastError()); |
||
194 | } |
||
195 | /** |
||
196 | * Samples for BMS ServiceType |
||
197 | */ |
||
198 | $bMS = new \PayPal\ServiceType\BMS($options); |
||
199 | $bMS->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
200 | /** |
||
201 | * Sample call for BMSetInventory operation/method |
||
202 | */ |
||
203 | if ($bMS->BMSetInventory(new \PayPal\StructType\BMSetInventoryReq()) !== false) { |
||
204 | print_r($bMS->getResult()); |
||
205 | } else { |
||
206 | print_r($bMS->getLastError()); |
||
207 | } |
||
208 | /** |
||
209 | * Samples for BMG ServiceType |
||
210 | */ |
||
211 | $bMG = new \PayPal\ServiceType\BMG($options); |
||
212 | $bMG->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
213 | /** |
||
214 | * Sample call for BMGetButtonDetails operation/method |
||
215 | */ |
||
216 | if ($bMG->BMGetButtonDetails(new \PayPal\StructType\BMGetButtonDetailsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
217 | print_r($bMG->getResult()); |
||
218 | } else { |
||
219 | print_r($bMG->getLastError()); |
||
220 | } |
||
221 | /** |
||
222 | * Sample call for BMGetInventory operation/method |
||
223 | */ |
||
224 | if ($bMG->BMGetInventory(new \PayPal\StructType\BMGetInventoryReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
225 | print_r($bMG->getResult()); |
||
226 | } else { |
||
227 | print_r($bMG->getLastError()); |
||
228 | } |
||
229 | /** |
||
230 | * Samples for BMM ServiceType |
||
231 | */ |
||
232 | $bMM = new \PayPal\ServiceType\BMM($options); |
||
233 | $bMM->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
234 | /** |
||
235 | * Sample call for BMManageButtonStatus operation/method |
||
236 | */ |
||
237 | if ($bMM->BMManageButtonStatus(new \PayPal\StructType\BMManageButtonStatusReq()) !== false) { |
||
238 | print_r($bMM->getResult()); |
||
239 | } else { |
||
240 | print_r($bMM->getLastError()); |
||
241 | } |
||
242 | /** |
||
243 | * Samples for BMB ServiceType |
||
244 | */ |
||
245 | $bMB = new \PayPal\ServiceType\BMB($options); |
||
246 | $bMB->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
247 | /** |
||
248 | * Sample call for BMButtonSearch operation/method |
||
249 | */ |
||
250 | if ($bMB->BMButtonSearch(new \PayPal\StructType\BMButtonSearchReq()) !== false) { |
||
251 | print_r($bMB->getResult()); |
||
252 | } else { |
||
253 | print_r($bMB->getLastError()); |
||
254 | } |
||
255 | /** |
||
256 | * Samples for Bill ServiceType |
||
257 | */ |
||
258 | $bill = new \PayPal\ServiceType\Bill($options); |
||
259 | $bill->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
260 | /** |
||
261 | * Sample call for BillUser operation/method |
||
262 | */ |
||
263 | if ($bill->BillUser(new \PayPal\StructType\BillUserReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
264 | print_r($bill->getResult()); |
||
265 | } else { |
||
266 | print_r($bill->getLastError()); |
||
267 | } |
||
268 | /** |
||
269 | * Sample call for BillAgreementUpdate operation/method |
||
270 | */ |
||
271 | if ($bill->BillAgreementUpdate(new \PayPal\StructType\BillAgreementUpdateReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
272 | print_r($bill->getResult()); |
||
273 | } else { |
||
274 | print_r($bill->getLastError()); |
||
275 | } |
||
276 | /** |
||
277 | * Sample call for BillOutstandingAmount operation/method |
||
278 | */ |
||
279 | if ($bill->BillOutstandingAmount(new \PayPal\StructType\BillOutstandingAmountReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
280 | print_r($bill->getResult()); |
||
281 | } else { |
||
282 | print_r($bill->getLastError()); |
||
283 | } |
||
284 | /** |
||
285 | * Samples for Transaction ServiceType |
||
286 | */ |
||
287 | $transaction = new \PayPal\ServiceType\Transaction($options); |
||
288 | $transaction->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
289 | /** |
||
290 | * Sample call for TransactionSearch operation/method |
||
291 | */ |
||
292 | if ($transaction->TransactionSearch(new \PayPal\StructType\TransactionSearchReq()) !== false) { |
||
293 | print_r($transaction->getResult()); |
||
294 | } else { |
||
295 | print_r($transaction->getLastError()); |
||
296 | } |
||
297 | /** |
||
298 | * Samples for Mass ServiceType |
||
299 | */ |
||
300 | $mass = new \PayPal\ServiceType\Mass($options); |
||
301 | $mass->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
302 | /** |
||
303 | * Sample call for MassPay operation/method |
||
304 | */ |
||
305 | if ($mass->MassPay(new \PayPal\StructType\MassPayReq()) !== false) { |
||
306 | print_r($mass->getResult()); |
||
307 | } else { |
||
308 | print_r($mass->getLastError()); |
||
309 | } |
||
310 | /** |
||
311 | * Samples for Address ServiceType |
||
312 | */ |
||
313 | $address = new \PayPal\ServiceType\Address($options); |
||
314 | $address->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
315 | /** |
||
316 | * Sample call for AddressVerify operation/method |
||
317 | */ |
||
318 | if ($address->AddressVerify(new \PayPal\StructType\AddressVerifyReq()) !== false) { |
||
319 | print_r($address->getResult()); |
||
320 | } else { |
||
321 | print_r($address->getLastError()); |
||
322 | } |
||
323 | /** |
||
324 | * Samples for Enter ServiceType |
||
325 | */ |
||
326 | $enter = new \PayPal\ServiceType\Enter($options); |
||
327 | $enter->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
328 | /** |
||
329 | * Sample call for EnterBoarding operation/method |
||
330 | */ |
||
331 | if ($enter->EnterBoarding(new \PayPal\StructType\EnterBoardingReq()) !== false) { |
||
332 | print_r($enter->getResult()); |
||
333 | } else { |
||
334 | print_r($enter->getLastError()); |
||
335 | } |
||
336 | /** |
||
337 | * Samples for Create ServiceType |
||
338 | */ |
||
339 | $create = new \PayPal\ServiceType\Create($options); |
||
340 | $create->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
341 | /** |
||
342 | * Sample call for CreateMobilePayment operation/method |
||
343 | */ |
||
344 | if ($create->CreateMobilePayment(new \PayPal\StructType\CreateMobilePaymentReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
345 | print_r($create->getResult()); |
||
346 | } else { |
||
347 | print_r($create->getLastError()); |
||
348 | } |
||
349 | /** |
||
350 | * Sample call for CreateBillingAgreement operation/method |
||
351 | */ |
||
352 | if ($create->CreateBillingAgreement(new \PayPal\StructType\CreateBillingAgreementReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
353 | print_r($create->getResult()); |
||
354 | } else { |
||
355 | print_r($create->getLastError()); |
||
356 | } |
||
357 | /** |
||
358 | * Sample call for CreateRecurringPaymentsProfile operation/method |
||
359 | */ |
||
360 | if ($create->CreateRecurringPaymentsProfile(new \PayPal\StructType\CreateRecurringPaymentsProfileReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
361 | print_r($create->getResult()); |
||
362 | } else { |
||
363 | print_r($create->getLastError()); |
||
364 | } |
||
365 | /** |
||
366 | * Samples for Set ServiceType |
||
367 | */ |
||
368 | $set = new \PayPal\ServiceType\Set($options); |
||
369 | $set->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
370 | /** |
||
371 | * Sample call for SetMobileCheckout operation/method |
||
372 | */ |
||
373 | if ($set->SetMobileCheckout(new \PayPal\StructType\SetMobileCheckoutReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
374 | print_r($set->getResult()); |
||
375 | } else { |
||
376 | print_r($set->getLastError()); |
||
377 | } |
||
378 | /** |
||
379 | * Sample call for SetAuthFlowParam operation/method |
||
380 | */ |
||
381 | if ($set->SetAuthFlowParam(new \PayPal\StructType\SetAuthFlowParamReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
382 | print_r($set->getResult()); |
||
383 | } else { |
||
384 | print_r($set->getLastError()); |
||
385 | } |
||
386 | /** |
||
387 | * Sample call for SetAccessPermissions operation/method |
||
388 | */ |
||
389 | if ($set->SetAccessPermissions(new \PayPal\StructType\SetAccessPermissionsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
390 | print_r($set->getResult()); |
||
391 | } else { |
||
392 | print_r($set->getLastError()); |
||
393 | } |
||
394 | /** |
||
395 | * Sample call for SetExpressCheckout operation/method |
||
396 | */ |
||
397 | if ($set->SetExpressCheckout(new \PayPal\StructType\SetExpressCheckoutReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
398 | print_r($set->getResult()); |
||
399 | } else { |
||
400 | print_r($set->getLastError()); |
||
401 | } |
||
402 | /** |
||
403 | * Sample call for SetCustomerBillingAgreement operation/method |
||
404 | */ |
||
405 | if ($set->SetCustomerBillingAgreement(new \PayPal\StructType\SetCustomerBillingAgreementReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
406 | print_r($set->getResult()); |
||
407 | } else { |
||
408 | print_r($set->getLastError()); |
||
409 | } |
||
410 | /** |
||
411 | * Samples for Do ServiceType |
||
412 | */ |
||
413 | $do = new \PayPal\ServiceType\_Do($options); |
||
414 | $do->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
415 | /** |
||
416 | * Sample call for DoMobileCheckoutPayment operation/method |
||
417 | */ |
||
418 | if ($do->DoMobileCheckoutPayment(new \PayPal\StructType\DoMobileCheckoutPaymentReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
419 | print_r($do->getResult()); |
||
420 | } else { |
||
421 | print_r($do->getLastError()); |
||
422 | } |
||
423 | /** |
||
424 | * Sample call for DoExpressCheckoutPayment operation/method |
||
425 | */ |
||
426 | if ($do->DoExpressCheckoutPayment(new \PayPal\StructType\DoExpressCheckoutPaymentReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
427 | print_r($do->getResult()); |
||
428 | } else { |
||
429 | print_r($do->getLastError()); |
||
430 | } |
||
431 | /** |
||
432 | * Sample call for DoUATPExpressCheckoutPayment operation/method |
||
433 | */ |
||
434 | if ($do->DoUATPExpressCheckoutPayment(new \PayPal\StructType\DoUATPExpressCheckoutPaymentReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
435 | print_r($do->getResult()); |
||
436 | } else { |
||
437 | print_r($do->getLastError()); |
||
438 | } |
||
439 | /** |
||
440 | * Sample call for DoDirectPayment operation/method |
||
441 | */ |
||
442 | if ($do->DoDirectPayment(new \PayPal\StructType\DoDirectPaymentReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
443 | print_r($do->getResult()); |
||
444 | } else { |
||
445 | print_r($do->getLastError()); |
||
446 | } |
||
447 | /** |
||
448 | * Sample call for DoCancel operation/method |
||
449 | */ |
||
450 | if ($do->DoCancel(new \PayPal\StructType\DoCancelReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
451 | print_r($do->getResult()); |
||
452 | } else { |
||
453 | print_r($do->getLastError()); |
||
454 | } |
||
455 | /** |
||
456 | * Sample call for DoCapture operation/method |
||
457 | */ |
||
458 | if ($do->DoCapture(new \PayPal\StructType\DoCaptureReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
459 | print_r($do->getResult()); |
||
460 | } else { |
||
461 | print_r($do->getLastError()); |
||
462 | } |
||
463 | /** |
||
464 | * Sample call for DoReauthorization operation/method |
||
465 | */ |
||
466 | if ($do->DoReauthorization(new \PayPal\StructType\DoReauthorizationReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
467 | print_r($do->getResult()); |
||
468 | } else { |
||
469 | print_r($do->getLastError()); |
||
470 | } |
||
471 | /** |
||
472 | * Sample call for DoVoid operation/method |
||
473 | */ |
||
474 | if ($do->DoVoid(new \PayPal\StructType\DoVoidReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
475 | print_r($do->getResult()); |
||
476 | } else { |
||
477 | print_r($do->getLastError()); |
||
478 | } |
||
479 | /** |
||
480 | * Sample call for DoAuthorization operation/method |
||
481 | */ |
||
482 | if ($do->DoAuthorization(new \PayPal\StructType\DoAuthorizationReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
483 | print_r($do->getResult()); |
||
484 | } else { |
||
485 | print_r($do->getLastError()); |
||
486 | } |
||
487 | /** |
||
488 | * Sample call for DoUATPAuthorization operation/method |
||
489 | */ |
||
490 | if ($do->DoUATPAuthorization(new \PayPal\StructType\DoUATPAuthorizationReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
491 | print_r($do->getResult()); |
||
492 | } else { |
||
493 | print_r($do->getLastError()); |
||
494 | } |
||
495 | /** |
||
496 | * Sample call for DoReferenceTransaction operation/method |
||
497 | */ |
||
498 | if ($do->DoReferenceTransaction(new \PayPal\StructType\DoReferenceTransactionReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
499 | print_r($do->getResult()); |
||
500 | } else { |
||
501 | print_r($do->getLastError()); |
||
502 | } |
||
503 | /** |
||
504 | * Sample call for DoNonReferencedCredit operation/method |
||
505 | */ |
||
506 | if ($do->DoNonReferencedCredit(new \PayPal\StructType\DoNonReferencedCreditReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
507 | print_r($do->getResult()); |
||
508 | } else { |
||
509 | print_r($do->getLastError()); |
||
510 | } |
||
511 | /** |
||
512 | * Samples for Update ServiceType |
||
513 | */ |
||
514 | $update = new \PayPal\ServiceType\Update($options); |
||
515 | $update->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
516 | /** |
||
517 | * Sample call for UpdateAccessPermissions operation/method |
||
518 | */ |
||
519 | if ($update->UpdateAccessPermissions(new \PayPal\StructType\UpdateAccessPermissionsReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
520 | print_r($update->getResult()); |
||
521 | } else { |
||
522 | print_r($update->getLastError()); |
||
523 | } |
||
524 | /** |
||
525 | * Sample call for UpdateAuthorization operation/method |
||
526 | */ |
||
527 | if ($update->UpdateAuthorization(new \PayPal\StructType\UpdateAuthorizationReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
528 | print_r($update->getResult()); |
||
529 | } else { |
||
530 | print_r($update->getLastError()); |
||
531 | } |
||
532 | /** |
||
533 | * Sample call for UpdateRecurringPaymentsProfile operation/method |
||
534 | */ |
||
535 | if ($update->UpdateRecurringPaymentsProfile(new \PayPal\StructType\UpdateRecurringPaymentsProfileReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
536 | print_r($update->getResult()); |
||
537 | } else { |
||
538 | print_r($update->getLastError()); |
||
539 | } |
||
540 | /** |
||
541 | * Samples for Execute ServiceType |
||
542 | */ |
||
543 | $execute = new \PayPal\ServiceType\Execute($options); |
||
544 | $execute->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
545 | /** |
||
546 | * Sample call for ExecuteCheckoutOperations operation/method |
||
547 | */ |
||
548 | if ($execute->ExecuteCheckoutOperations(new \PayPal\StructType\ExecuteCheckoutOperationsReq()) !== false) { |
||
549 | print_r($execute->getResult()); |
||
550 | } else { |
||
551 | print_r($execute->getLastError()); |
||
552 | } |
||
553 | /** |
||
554 | * Samples for Manage ServiceType |
||
555 | */ |
||
556 | $manage = new \PayPal\ServiceType\Manage($options); |
||
557 | $manage->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
558 | /** |
||
559 | * Sample call for ManagePendingTransactionStatus operation/method |
||
560 | */ |
||
561 | if ($manage->ManagePendingTransactionStatus(new \PayPal\StructType\ManagePendingTransactionStatusReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
562 | print_r($manage->getResult()); |
||
563 | } else { |
||
564 | print_r($manage->getLastError()); |
||
565 | } |
||
566 | /** |
||
567 | * Sample call for ManageRecurringPaymentsProfileStatus operation/method |
||
568 | */ |
||
569 | if ($manage->ManageRecurringPaymentsProfileStatus(new \PayPal\StructType\ManageRecurringPaymentsProfileStatusReq()) !== false) { |
||
0 ignored issues
–
show
|
|||
570 | print_r($manage->getResult()); |
||
571 | } else { |
||
572 | print_r($manage->getLastError()); |
||
573 | } |
||
574 | /** |
||
575 | * Samples for Reverse ServiceType |
||
576 | */ |
||
577 | $reverse = new \PayPal\ServiceType\Reverse($options); |
||
578 | $reverse->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
579 | /** |
||
580 | * Sample call for ReverseTransaction operation/method |
||
581 | */ |
||
582 | if ($reverse->ReverseTransaction(new \PayPal\StructType\ReverseTransactionReq()) !== false) { |
||
583 | print_r($reverse->getResult()); |
||
584 | } else { |
||
585 | print_r($reverse->getLastError()); |
||
586 | } |
||
587 | /** |
||
588 | * Samples for External ServiceType |
||
589 | */ |
||
590 | $external = new \PayPal\ServiceType\External($options); |
||
591 | $external->setSoapHeaderRequesterCredentials($RequesterCredentials); |
||
592 | /** |
||
593 | * Sample call for ExternalRememberMeOptOut operation/method |
||
594 | */ |
||
595 | if ($external->ExternalRememberMeOptOut(new \PayPal\StructType\ExternalRememberMeOptOutReq()) !== false) { |
||
596 | print_r($external->getResult()); |
||
597 | } else { |
||
598 | print_r($external->getLastError()); |
||
599 | } |
||
600 |