thecodeinfluencer / create-daraja-app

Bootstrap MPesa Daraja APIs across different frameworks with a single command.
https://www.npmjs.com/package/create-daraja-app
2 stars 3 forks source link

mpesa-rails-express #2

Closed Annastacia-dev closed 3 months ago

Annastacia-dev commented 3 months ago

What

This PR introduces mpesa-rails-express app in templates as the base template for mpesa express product for a rails app.

This templates uses ruby 3.2.2 and rails 7.1.3 as the default versions. Aside from the default gem dependencies it has 2 gem dependencies gem 'dotenv' to help load variables defined in a .env file and gem rest-client to make http requests.

The logic is defined in app/controllers/api/example_controller.rb which includes two concern files stk and callback defined under app/controllers/concerns/example/stk.rb and app/controller/concerns/exaple/callback.rb respectively.

example_controller.rb contains methods shared between all products

Responses are in JSON format.

Screenshots

Screenshot from 2024-05-27 11-30-51 Screenshot from 2024-05-27 11-30-35