|
@@ 33-39 (lines=7) @@
|
| 30 |
|
return [ |
| 31 |
|
[['business'], 'required', 'on' => [PaymentGateway::RC_PURCHASE, PaymentGateway::RC_GET_MERCHANT_DATA]], |
| 32 |
|
[['merchant_id', 'transaction_id'], 'required', 'on' => PaymentGateway::RC_QUERY_DR], |
| 33 |
|
[['checksum'], 'required', 'on' => [PaymentGateway::RC_QUERY_DR, PaymentGateway::RC_PURCHASE], 'when' => function () { |
| 34 |
|
if ($this->command === PaymentGateway::RC_PURCHASE) { |
| 35 |
|
return !$this->getClient()->getGateway()->pro; |
| 36 |
|
} else { |
| 37 |
|
return true; |
| 38 |
|
} |
| 39 |
|
}], |
| 40 |
|
[['signature'], 'required', 'on' => [PaymentGateway::RC_GET_MERCHANT_DATA, PaymentGateway::RC_PURCHASE], 'when' => function () { |
| 41 |
|
if ($this->command === PaymentGateway::RC_PURCHASE) { |
| 42 |
|
return $this->getClient()->getGateway()->pro; |
|
@@ 40-46 (lines=7) @@
|
| 37 |
|
return true; |
| 38 |
|
} |
| 39 |
|
}], |
| 40 |
|
[['signature'], 'required', 'on' => [PaymentGateway::RC_GET_MERCHANT_DATA, PaymentGateway::RC_PURCHASE], 'when' => function () { |
| 41 |
|
if ($this->command === PaymentGateway::RC_PURCHASE) { |
| 42 |
|
return $this->getClient()->getGateway()->pro; |
| 43 |
|
} else { |
| 44 |
|
return true; |
| 45 |
|
} |
| 46 |
|
}], |
| 47 |
|
[['order_id', 'total_amount', 'url_success'], 'required', 'on' => [PaymentGateway::RC_PURCHASE]], |
| 48 |
|
[['payer_name', 'payer_email', 'payer_phone_no', 'bank_payment_method_id'], 'required', 'on' => PaymentGateway::RC_PURCHASE, 'when' => function () { |
| 49 |
|
return $this->getClient()->getGateway()->pro; |