-
Notifications
You must be signed in to change notification settings - Fork 0
/
Choice.php
51 lines (47 loc) · 1.42 KB
/
Choice.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace Dfe\GingerPaymentsBase;
use Dfe\GingerPaymentsBase\Charge as C;
use Dfe\GingerPaymentsBase\Source\Option as SO;
/**
* 2017-04-17
* @method \Dfe\GingerPaymentsBase\Method m()
* @method \Dfe\GingerPaymentsBase\Settings s($k = null)
*/
final class Choice extends \Df\Payment\Choice {
/**
* 2017-04-17
* @override
* @see \Df\Payment\Choice::title()
* @used-by \Df\Payment\Block\Info::choiceT()
* @used-by \Df\Payment\Observer\DataProvider\SearchResult::execute()
*/
function title():string {return dftr($this->optionCodeI(), $this->s()->os()->map());}
/**
* 2017-03-29
* @used-by \Dfe\GingerPaymentsBase\Block\Info::bt()
*/
function bt():bool {return SO::BT === $this->optionCodeI();}
/**
* 2017-03-29
* @used-by self::optionCode()
* @used-by self::prepareCommon()
* @return array(string => string|array)
*/
private function option():array {return dfc($this, function():array {return $this->psTransaction($this->req());});}
/**
* 2017-03-29
* @used-by self::bt()
* @used-by self::title()
*/
private function optionCodeI():string {return dfc($this, function():string {return $this->m()->optionI(
$this->option()[C::K_PAYMENT_METHOD]
);});}
/**
* 2017-03-29
* @used-by self::option()
* @used-by self::res0()
* @param array(string => mixed) $data
* @return array(string => mixed)
*/
private function psTransaction(array $data):array {return df_first($data[C::K_TRANSACTIONS]);}
}