Skip to content

Commit

Permalink
feat: Support multi merchant
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrodz authored Mar 23, 2022
1 parent d026a2e commit 983d1e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/WeAreDe/TbcPay/TbcPayProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ class TbcPayProcessor
*/
public $biller;

/**
* when using multimerchant, sub account id, optional
* @var string
*/
public $merchant_id2;

/**
* charge ertguli points instead of cash
* @var bool
Expand Down Expand Up @@ -198,6 +204,7 @@ public function sms_start_transaction()
'description' => $this->description,
'language' => $this->language,
'biller' => $this->biller,
'merchant_id2' => $this->merchant_id2,
'msg_type' => 'SMS'
);

Expand Down Expand Up @@ -226,6 +233,7 @@ public function dms_start_authorization()
'description' => $this->description,
'language' => $this->language,
'biller' => $this->biller,
'merchant_id2' => $this->merchant_id2,
'msg_type' => 'DMS'
);

Expand Down Expand Up @@ -257,6 +265,7 @@ public function dms_make_transaction($trans_id)
'client_ip_addr' => $this->client_ip_addr,
'description' => $this->description,
'language' => $this->language,
'merchant_id2' => $this->merchant_id2,
'msg_type' => 'DMS'
);

Expand Down Expand Up @@ -420,6 +429,7 @@ public function capture_and_save( $biller_client_id, $expiry )
'biller_client_id' => $biller_client_id,
'perspayee_expiry' => $expiry, // MMYY
'perspayee_gen' => 1,
'merchant_id2' => $this->merchant_id2,
'msg_type' => 'SMS',
);

Expand All @@ -441,6 +451,7 @@ public function save( $biller_client_id, $expiry )
'biller_client_id' => $biller_client_id,
'perspayee_expiry' => $expiry, // MMYY
'perspayee_gen' => 1,
'merchant_id2' => $this->merchant_id2,
'msg_type' => 'AUTH',
);

Expand All @@ -457,6 +468,7 @@ public function capture_saved( $biller_client_id )
'description' => $this->description,
'biller' => $this->biller,
'biller_client_id' => $biller_client_id,
'merchant_id2' => $this->merchant_id2,
);

if ($this->charge_ertguli_points) {
Expand Down

0 comments on commit 983d1e4

Please sign in to comment.