README.md in workarea-afterpay-2.0.2 vs README.md in workarea-afterpay-2.1.0

- old
+ new

@@ -16,38 +16,34 @@ 1. An API call is made on the Checkout Payment step to see if the order is eligible for Afterpay. 2. If eligible an option for Afterpay is displayed. 3. User clicks place order button - an api call is made to get a token. 4. If token creation is successful the token is injected into the DOM and the user is redirected to the Afterpay site. 5. User enters payment details and submits payment. -6. User is taken back to Workarea and payment is captured. +6. User is taken back to Workarea and payment is authorized or captured. 7. Order confirmation page is displayed. -A diagram of the flow can be found here: https://docs.afterpay.com/us-online-api-v1.html#direct-payment-flow +Afterpay API documentation can be found here: https://docs.afterpay.com/online-api-v2-b857508478e7.html Implementation Notes -------------------------------------------------------------------------------- -**Payment** - -Afterpay requires that all payments are captured when the order is placed. All Afterpay -payments will perform a "Purchase" action instead of the default "Authorize"; meaning that Afterpay payments will be "captured" immediately. Other payment tenders will still behave as configured. - - **Product Detail Pages** This integration makes use of the ```storefront.product_pricing_details``` append point to display the Afterpay pricing on the product detail page. Some custom PDP templates may not have this append point. If you wish for the Afterpay pricing to appear on your custom PDP template simply add the append point manually by adding the following: -```= append_partials('storefront.product_pricing_details', product: product)``` +```ruby += append_partials('storefront.product_pricing_details', product: product) +``` **Testing** The test API endpoints will be used by default. Production mode can be triggered by setting the ***test*** configuration value in an initializer to ***false***. -``` +```ruby config.afterpay.test = false ``` **Proxy** @@ -84,48 +80,29 @@ Getting Started -------------------------------------------------------------------------------- -This gem contains a rails engine that must be mounted onto a host Rails application. +Add the gem to your application's Gemfile: -To access Workarea gems and source code, you must be an employee of WebLinc or a licensed retailer or partner. +```ruby +# ... +gem 'workarea-afterpay' +# ... +``` -Workarea gems are hosted privately at https://gems.weblinc.com/. -You must have individual or team credentials to install gems from this server. Add your gems server credentials to Bundler: - - bundle config gems.weblinc.com my_username:my_password - -Or set the appropriate environment variable in a shell startup file: - - export BUNDLE_GEMS__WEBLINC__COM='my_username:my_password' - -Then add the gem to your application's Gemfile specifying the source: - - # ... - gem 'workarea-afterpay', source: 'https://gems.weblinc.com' - # ... - -Or use a source block: - - # ... - source 'https://gems.weblinc.com' do - gem 'workarea-afterpay' - end - # ... - Update your application's bundle. - cd path/to/application - bundle +```bash +cd path/to/application +bundle +``` -Workarea Platform Documentation +Workarea Commerce Documentation -------------------------------------------------------------------------------- -See [http://developer.workarea.com](http://developer.workarea.com) for Workarea platform documentation. +See [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation. -Copyright & Licensing +License -------------------------------------------------------------------------------- -Copyright WebLinc 2018. All rights reserved. - -For licensing, contact sales@workarea.com. +Workarea Afterpay is released under the [Business Software License](LICENSE)