PluginProbe
HyperPay Payments / trunk
HyperPay Payments vtrunk
6.6.0 trunk 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.1.0 2.2.0 2.3.0 2.3.1 2.3.2 2.3.3 3.0.0 3.0.5 4.0.0 4.0.2 All 34 releases
hyperpay-gateways / src / Helpers / COF.php

COF.php in HyperPay Payments trunk, at src/Helpers/COF.php

39 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Hyperpay\Gateways\Helpers;
4
5 class COF
6 {
7
8 public static function build_cit_params($agreementId)
9 {
10 return [
11 'standingInstruction.mode' => 'INITIAL',
12 'standingInstruction.type' => 'UNSCHEDULED',
13 'standingInstruction.source' => 'CIT',
14 'standingInstruction.recurringType' => 'STANDING_ORDER',
15 'standingInstruction.expiry' => gmdate('Y-m-d', strtotime('+3 years')),
16 'customParameters[paymentFrequency]' => 'OTHER',
17 'customParameters[recurringPaymentAgreement]' => $agreementId,
18 'customParameters[standingInstruction]' => 'UNSCHEDULED',
19 'customParameters[PostBridge_MADA_AGREEMENT_ID]' => $agreementId,
20 ];
21 }
22
23 public static function build_mit_params($agreementId, $initialTxId = '')
24 {
25 return [
26 'standingInstruction.mode' => 'REPEATED',
27 'standingInstruction.type' => 'UNSCHEDULED',
28 'standingInstruction.source' => 'MIT',
29 'standingInstruction.initialTransactionId' => $initialTxId,
30 'standingInstruction.expiry' => gmdate('Y-m-d', strtotime('+3 years')),
31 'customParameters[plugin]' => 'wordpress',
32 'customParameters[standingInstruction]' => 'UNSCHEDULED',
33 'customParameters[recurringPaymentAgreement]' => $agreementId,
34 'customParameters[CardholderInitiatedTransactionID]' => $initialTxId,
35 'customParameters[PostBridge_MADA_AGREEMENT_ID]' => $agreementId,
36 ];
37 }
38 }
39