| 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 |
|