@@ 385-393 (lines=9) @@ | ||
382 | } |
|
383 | ||
384 | $this->ValidateIsCollection(true); |
|
385 | if ($this->PostParams['IsCollection'] == IsCollection::NO) { |
|
386 | // 若設定為僅配送,清除代收金額 |
|
387 | unset($this->PostParams['CollectionAmount']); |
|
388 | } else { |
|
389 | $this->ValidateAmount('CollectionAmount', $this->PostParams['CollectionAmount']); |
|
390 | if ($this->PostParams['CollectionAmount'] < $MinAmount or $this->PostParams['CollectionAmount'] > $MaxAmount) { |
|
391 | throw new Exception('Invalid CollectionAmount.'); |
|
392 | } |
|
393 | } |
|
394 | ||
395 | if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::HILIFE_C2C or $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C) { |
|
396 | // 物流子類型(LogisticsSubType)為萊爾富店到店(HILIFEC2C)、 統一超商交貨便(UNIMARTC2C)時,不可為空 |
|
@@ 576-584 (lines=9) @@ | ||
573 | } |
|
574 | ||
575 | $this->ValidateIsCollection(true); |
|
576 | if ($this->PostParams['IsCollection'] == IsCollection::NO) { |
|
577 | // 若設定為僅配送,清除代收金額 |
|
578 | unset($this->PostParams['CollectionAmount']); |
|
579 | } else { |
|
580 | $this->ValidateAmount('CollectionAmount', $this->PostParams['CollectionAmount']); |
|
581 | if ($this->PostParams['CollectionAmount'] < $MinAmount or $this->PostParams['CollectionAmount'] > $MaxAmount) { |
|
582 | throw new Exception('Invalid CollectionAmount.'); |
|
583 | } |
|
584 | } |
|
585 | ||
586 | if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::HILIFE_C2C or $this->PostParams['LogisticsSubType'] == LogisticsSubType::UNIMART_C2C) { |
|
587 | // 物流子類型(LogisticsSubType)為萊爾富店到店(HILIFEC2C)、 統一超商交貨便(UNIMARTC2C)時,不可為空 |