Piryx omniauth OAuth2 strategy.
gem 'omniauth-piryx'
bundle
Sign up for Piryx and create an application. Once you have the client id and client secret associate them with the OmniAuth strategy.
Rails.application.config.middleware.use OmniAuth::Builder do
provider :piryx, ENV["PIRYX_CLIENT_ID"], ENV["PIRYX_CLIENT_SECRET"], scope: "never_expire,create_payment,payment_details,payment_summary", sandbox: !Rails.env.production?
endIf a value for sandbox is not passed in the production API will always be used instead.
You can change the permissions by selecting from the scopes available and passing them into the configuration above. The default scopes set by this middleware are create_payment and payment_details.
