| Total Complexity | 7 |
| Total Lines | 70 |
| 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() |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Initiate a balance enquiry. |
||
| 37 | * |
||
| 38 | * @return Balance |
||
| 39 | */ |
||
| 40 | public function balance() |
||
| 41 | { |
||
| 42 | return new Balance(); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Initialize a customer to business transaction. |
||
| 47 | * |
||
| 48 | * @return C2B |
||
| 49 | */ |
||
| 50 | public function c2b() |
||
| 51 | { |
||
| 52 | return new C2B(); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Initiate a transaction reversal. |
||
| 57 | * |
||
| 58 | * @return Reversal |
||
| 59 | */ |
||
| 60 | public function reversal() |
||
| 61 | { |
||
| 62 | return new Reversal(); |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Initiate a transaction status check. |
||
| 67 | * |
||
| 68 | * @return Transaction |
||
| 69 | */ |
||
| 70 | public function transaction() |
||
| 71 | { |
||
| 72 | return new Transaction(); |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Initiate a LIPA NA MPESA ONLINE transaction using STK push. |
||
| 77 | * |
||
| 78 | * @return STK |
||
| 79 | */ |
||
| 80 | public function STK() |
||
| 83 | } |
||
| 84 | } |
||
| 85 |