Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poli

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Poli

API to integrate POLi payment gateway -- http://www.polipayments.com

Installation

Add this line to your application's Gemfile:

gem 'poli'

And then execute:

$ bundle

Or install it yourself as:

$ gem install poli

Usage

Use in irb

  1. check poli version in terminal:

    poli -v

  2. generate poli configuration file, and change it to use your merchant code and authentication code:

    poli generate

  3. go into irb, and type:

    > require 'poli'
    > Poli::POLi.load_config # by default will use poli.yml in current folder or ./config folder
    > financialInstitutions = Poli::POLi.get_financialInstitutions
    > puts financialInstitutions

Use with rails app

  1. put configuration file to yourApp/config/ folder, or generate poli one under your app folder:

    poli generate

  2. put the following code into your initialize file, could be "config/initializers/all_init.rb":

    Poli::POLi.load_config

Sample of the configuration file

	defaults: &DEFAULTS
	  currency_code: "AUD"
	  timeout: 900

	  homepage_url: http://localhost:3000
	  notification_url: http://localhost:3000/poli/notification
	  checkout_url: http://localhost:3000/profile/poli/checkout
	  successful_url: http://localhost:3000/profile/poli/successful
	  unsuccessful_url: http://localhost:3000/profile/poli/unsuccessful

	  initiate_transaction: https://merchantapi.apac.paywithpoli.com/MerchantAPIService.svc/Xml/transaction/initiate
	  get_transaction: https://merchantapi.apac.paywithpoli.com/MerchantAPIService.svc/Xml/transaction/query
	  get_financial_institutions: https://merchantapi.apac.paywithpoli.com/MerchantAPIService.svc/Xml/banks

	  merchant_code: 1111111
	  authentication_code: 222222222

	development:
	  <<: *DEFAULTS
	  merchant_code: 1111111
	  authentication_code: 222222222

	test:
	  <<: *DEFAULTS
	  merchant_code: 1111111
	  authentication_code: 222222222

	production:
	  <<: *DEFAULTS
	  merchant_code: 1111111
	  authentication_code: 222222222

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 08 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc