| @@ 81-90 (lines=10) @@ | ||
| 78 | * @param Request $request |
|
| 79 | * @return \Illuminate\Http\JsonResponse |
|
| 80 | */ |
|
| 81 | public function confirmation(Request $request) |
|
| 82 | { |
|
| 83 | $this->repository->notification('MPESA Confirmation: *C2B*', true); |
|
| 84 | $this->repository->processConfirmation(json_encode($request->all())); |
|
| 85 | $resp = [ |
|
| 86 | 'ResultCode' => 0, |
|
| 87 | 'ResultDesc' => 'Confirmation received successfully', |
|
| 88 | ]; |
|
| 89 | return response()->json($resp); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * @return \Illuminate\Http\JsonResponse |
|
| @@ 109-118 (lines=10) @@ | ||
| 106 | * @param Request $request |
|
| 107 | * @return \Illuminate\Http\JsonResponse |
|
| 108 | */ |
|
| 109 | public function stkCallback(Request $request) |
|
| 110 | { |
|
| 111 | $this->repository->notification('MPESA STK Callback: *C2B*', true); |
|
| 112 | $this->repository->processStkPushCallback(json_encode($request->Body)); |
|
| 113 | $resp = [ |
|
| 114 | 'ResultCode' => 0, |
|
| 115 | 'ResultDesc' => 'STK Callback received successfully', |
|
| 116 | ]; |
|
| 117 | return response()->json($resp); |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * @return \Illuminate\Http\JsonResponse |
|