1 | <?php |
||
43 | class SubstractPointProcessor implements ItemHolderProcessor |
||
44 | { |
||
45 | /** |
||
46 | * @var BaseInfo |
||
47 | */ |
||
48 | protected $BaseInfo; |
||
49 | |||
50 | /** |
||
|
|||
51 | * SubstractPointProcessor constructor. |
||
52 | * |
||
53 | * @param $app |
||
54 | */ |
||
55 | public function __construct(BaseInfo $BaseInfo) |
||
59 | |||
60 | /** |
||
61 | * @param ItemHolderInterface $itemHolder |
||
62 | * @param PurchaseContext $context |
||
63 | * |
||
64 | * @return ProcessResult |
||
65 | */ |
||
66 | public function process(ItemHolderInterface $itemHolder, PurchaseContext $context) |
||
75 | |||
76 | /** |
||
77 | * Substract point. |
||
78 | * |
||
79 | * @param integer $totalPoint 合計ポイント |
||
80 | * @param integer $usePoint 利用ポイント |
||
81 | * @param integer $pointRate ポイント付与率(%) |
||
82 | * @return integer Point after substraction |
||
83 | */ |
||
84 | protected function substract($totalPoint, $usePoint, $pointRate) |
||
89 | } |
||
90 |