README.md in pxpay-0.1.1 vs README.md in pxpay-0.1.2

- old
+ new

@@ -1,18 +1,20 @@ PxPay ======= A Rubygem to integrate DPS-hosted payments through the Payment Express PxPay system. -For self-hosted systems check out the amazing [ActiveMerchant](https://www.github.com/Shopify/active_merchant) gem -See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html> or <http://www.paymentexpress.com/downloads/DPSECOM_PXPay.pdf> for more details of PxPay +For self-hosted systems check out the amazing [ActiveMerchant](https://www.github.com/Shopify/active_merchant) gem. + +See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html> or <http://www.paymentexpress.com/downloads/DPSECOM_PXPay.pdf> for more details about PxPay. + Installation ------------ Install from Rubygems gem install pxpay -Then run `rails g pxpay:install` to copy an initializer and a config yml file to your rails app. +Then run `rails generate pxpay:install` to copy an initializer and a config yml file to your rails app. Make sure you add your own development credentials to the `config/pxpay.yml` file and create success and failure URLs for Payment Express to redirect you back to -You can apply for a development account at https://www.paymentexpress.com/pxmi/apply +You can apply for a development account at <https://www.paymentexpress.com/pxmi/apply> Usage ----- >> require 'nokogiri' @@ -28,42 +30,46 @@ def create request = Pxpay::Request.new( id , price, options ) redirect_to request.url end -Once your customer has entered their details Payment Express will redirect the back to the success URL that you provided. Use Pxpay:Response to get the details back from Payment Express. +Once your customer has entered their details Payment Express will redirect them back to the success URL that you provided. +Use Pxpay:Response to get the transaction details back from Payment Express. + def success response = Pxpay::Response.new(params).response hash = response.to_hash ## Do something with the results hash end -N.B. There is a minor caveat here: Payment Express has a system called fail-proof result notification where as soon as the customer has finished the transaction they will send a background request. This means your success/failure URL will be hit at least twice for -each transaction, so you must allow for this in your code. See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#ResultNotification> for details. +N.B. There is a minor caveat here: Payment Express includes a system called fail-proof result notification where as soon as the customer has finished the transaction they will send a background request. +This means your success/failure URL will be hit at least twice for each transaction, so you must allow for this in your code. See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#ResultNotification> for details. -TODO -Add tests -Add ability to set global configuration options -Token Billing -Remove rails dependencies +N.B. +---- -This gem is as of yet untested. - This gem is in no way endorsed or affiliated with Payment Express -== Contributing to PxPay - +TODO +---- +* Add ability to set global configuration options +* Add more tests +* Token Billing + +Contributing to PxPay +===================== * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. -== Copyright +Copyright +========= Copyright (c) 2011 Bradley Priest. See LICENSE.txt for further details.