| Total Complexity | 7 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class MpesaApi |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Initiate a business to business transaction. |
||
| 17 | * |
||
| 18 | * @return B2B |
||
| 19 | */ |
||
| 20 | public function b2b() |
||
| 21 | { |
||
| 22 | return new B2B(); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Initiate a business to customer transaction. |
||
| 27 | * |
||
| 28 | * @return B2C |
||
| 29 | */ |
||
| 30 | public function b2c() |
||
| 31 | { |
||
| 32 | return new B2C(); |
||
| 33 | } |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * Initiate a balance enquiry. |
||
| 38 | * |
||
| 39 | * @return Balance |
||
| 40 | */ |
||
| 41 | public function balance() |
||
| 42 | { |
||
| 43 | return new Balance(); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Initialize a customer to business transaction. |
||
| 48 | * |
||
| 49 | * @return C2B |
||
| 50 | */ |
||
| 51 | public function c2b() |
||
| 52 | { |
||
| 53 | return new C2B(); |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Initiate a transaction reversal. |
||
| 58 | * |
||
| 59 | * @return Reversal |
||
| 60 | */ |
||
| 61 | public function reversal() |
||
| 62 | { |
||
| 63 | return new Reversal(); |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Initiate a transaction status check. |
||
| 68 | * |
||
| 69 | * @return Transaction |
||
| 70 | */ |
||
| 71 | public function transaction() |
||
| 72 | { |
||
| 73 | return new Transaction(); |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Initiate a LIPA NA MPESA ONLINE transaction using STK push. |
||
| 78 | * |
||
| 79 | * @return STK |
||
| 80 | */ |
||
| 81 | public function STK() |
||
| 84 | } |
||
| 85 | } |