|
@@ -19,6 +19,7 @@ class order
|
|
|
private $mLastOrderID;
|
|
|
private $mOriginQuality;
|
|
|
private $mCurQuality;
|
|
|
+ private $mMchCardType; //用于产品和卡类型绑定的充值机构.
|
|
|
|
|
|
private $mCardType;
|
|
|
private $mRegionNo;
|
|
@@ -41,6 +42,7 @@ class order
|
|
|
$this->mProductCode = '';
|
|
|
$this->mThirdPorductType = 0;
|
|
|
$this->mMatchRatio = false;
|
|
|
+ $this->mMchCardType = 0;
|
|
|
}
|
|
|
|
|
|
public function mchid() {
|
|
@@ -65,7 +67,7 @@ class order
|
|
|
public function set_match($match) {
|
|
|
$this->mMatchRatio = $match;
|
|
|
}
|
|
|
- public function match() {
|
|
|
+ public function match_ratio() {
|
|
|
return $this->mMatchRatio;
|
|
|
}
|
|
|
|
|
@@ -125,6 +127,17 @@ class order
|
|
|
'third_card_type' => $this->mThirdCardType];
|
|
|
return $third_params;
|
|
|
}
|
|
|
+
|
|
|
+ public function match_card_type()
|
|
|
+ {
|
|
|
+ if($this->mMchCardType === 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return $this->mMchCardType === $this->card_type();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function is_transfer() {
|
|
|
return $this->mIsTransfer;
|
|
|
}
|
|
@@ -205,6 +218,7 @@ class order
|
|
|
$this->mQuantity = $params['quantity'] ?? 1;
|
|
|
$this->mOriginQuality = intval($params['org_quality']) ?? 0;
|
|
|
$this->mMatchRatio = $params['match_ratio'] ?? false;
|
|
|
+ $this->mMchCardType = $params['mch_card_type'] ?? 0;
|
|
|
|
|
|
$card_type = intval($params['card_type']) ?? 0;
|
|
|
if($card_type == mtopcard\ThirdRefillCard)
|