[](https://www.npmjs.com/package/config-essentials)
Curated addons to bring out the best of Storybook
All essential TypeScript types in one place
A smaller version of caniuse-db, with only the essentials!
Essential initialization for every JavaScript process
Essential editing features for CKEditor 5.
A tiny raf ponyfill
Money Forward's ESLint rules as an extensible shared config.
Rollup configuration essentials
Highlight DOM nodes within your stories
A setTimeout() function that uses requestAnimationFrame() in the background for ticks
No description provided.
A memoization algorithm that only caches the result of the latest set of arguments, where argument equality is determined via a provided equality function.
A Map-like data structure that only stores the most recently set key/value pair
Money Forward's Stylelint rules as an extensible shared config.
Essential interfaces and tools for backend development on Azure Functions with TypeScript
Essentials rules for Envdoctor
Validation plugin for FormKit
A fork of @tweakpane/plugin-essentials with build optimizations.
Avalanche Platform JS Library
wakamsha's ESLint rules as an extensible shared config.
Commonly shared types for FormKit
CSS framework and utils to build FESTO web applications
wakamsha's Stylelint rules as an extensible shared config.
# Payfast Payfast is a Ruby gem that simplifies the process of integrating the PayFast payment gateway into your Ruby on Rails application. It provides a generator that helps scaffold the necessary configuration, routes, models, and controllers required to integrate PayFast seamlessly. ## Demo  ## Installation Add this line to your application's Gemfile: ```bash bundle add payfast ``` ## Usage ```bash rails generate payfast:install ``` ## This generator will perform the following actions: insert config/routes.rb create app/controllers/carts_controller.rb create app/views/carts/index.html.erb create app/views/carts/make_payment.html.erb create app/helpers/carts_helper.rb create db/migrate/20230824105530_create_carts.rb create config/payfast.yml create app/models/cart.rb insert app/views/layouts/application.html.erb insert config/environments/development.rb ## Additional configuration Setup payfast credentials for your environment rails EDITOR="code --wait" bin/rails credentials:edit This will allow you to securely edit and store your credentials. once you save and exit the file, the credentials will be encrypted and can only be accessed withe rails master key. payfast: merchant_id: {your_merchant_id} merchant_key: {your_merchant_key} passphrase: {{your_passphrase}} ## Update your `payfast.yml` config file - setup the credentials to be use by the rails app - uncomment `Rails.application.credentials.payfast.merchant_id ` and wrap it in erb tags as instructed in the comments. ## Templates Update the `make_payment.html.erb` as instructed in the file. it should look like so: ```js <script> // set the uuid to uuid = @cart.payment_uid. surround @carts.payment_uid with erb tags const uuid = `<%= @cart.payment_uuid %>` window.payfast_do_onsite_payment({uuid}, function (result) { if (result === true) { // redirect success_path(@cart) window.location.href = `<%= success_cart_path(@cart) %>` } else { // Redirect to failure_path(@cart) window.location.href = `<%= failure_cart_path(@cart) %>` } }); </script> ``` ## Testing - payfast api allows only SSL communication from your server. inorder to test locally. you will have to use a tunneling service that allows you to expose your local development server to the internet. your rails development config has was modified by the generator to allow ngrok hosts to hit your rails server ```ruby config.hosts << /[a-z0-9-]+\.ngrok-free\.app/ ``` ## Contributing Thank you for considering contributing to our project! We welcome contributions from the community to help improve this project and make it better for everyone. ### Issues If you encounter any issues or bugs while using our project, please [open a new issue](https://github.com/mactunechy/payfast/issues) on GitHub. Please make sure to include detailed information about the problem, steps to reproduce it, and the environment in which you encountered it. ### Pull Requests We encourage pull requests from the community! If you have an improvement or new feature you'd like to contribute, please follow these steps: 1. Fork the repository and create a new branch for your feature or bug fix. 2. Make your changes and write tests to cover any new functionality. 3. Ensure that the existing tests pass and write additional tests for any bug fixes. 4. Commit your changes and push the new branch to your forked repository. 5. Submit a pull request to our main repository, including a detailed description of the changes you made and any relevant information. We will review your pull request as soon as possible and provide feedback if needed. We value your contributions and will work with you to ensure your changes are integrated smoothly. d Your contributions are essential to the success of this project, and we are grateful for your help in making it better for everyone. If you have any questions or need further assistance, feel free to reach out to us. Happy coding!
== Devise::Revokable A module for Devise[http://github.com/plataformatec/devise] This gem was created by "borrowing" heavily from Devise::Invitable[http://github.com/scambra/devise_invitable] It exists to extend Devise to provide the basis for what is essentially the reverse of the standard <tt>confirmable</tt> module. Where <tt>confirmable</tt> sends an email and awaits a response, before confirming a new registration, <tt>revokable</tt> allows immediate access and sends an email which provides a link to "revoke" the account if it was created fraudulently. This is useful if you want to lower the barrier to entry to creating accounts, and clearly, if account security isn't a concern. Note that tests are non-existent. Use freely but at your own risk. === Configuring It works like normal Devise modules. Add the <tt>:revokable</tt> module to the declaration. # in user.rb devise :revokable # plus other devise modules If the user who received the revocation email follows the provided link and confirms revocation, the account will effectively be "revoked" and inactive, unable to log in. Additionally, you may want to override <tt>#revoke!</tt> to perfom additional revocation on the account, e.g. deleting posts made, resetting personal information, etc. The super method yields to a block for this purpose. # in user.rb def revoke! super do self.some_method_that_resets_me! end end That's about the extent of it. As with typical devise modules you can override the mailers and views with your own. Additionally you can define the module accessor <tt>@@mailer</tt> on the module with a proc to handle your mail if you need to. This proc is yielded two arguments, the method name (e.g. :revocation_instructions), and the affected resource. # in config/initializers/devise_revokable.rb require 'devise_revokable' require 'my_mailer' DeviseRevokable.mailer = proc {|method_name, resource| MyMailer.send(:method_name, resource) }
Contentful API wrapper library exposing an ActiveRecord-like interface
No description provided.
No description provided.