<commit_before># BitPay plugin for Spree Commerce
[![Build Status](https://travis-ci.org/bitpay/spree_bitpay.svg?branch=master)](https://travis-ci.org/bitpay/spree_bitpay)

BitPay Payments connector for SpreeCommerce RoR storefront.  Accept bitcoin payments with ZERO fees.  Choose remittance in your local currency or take a percentage in BTC.  

Sign up for your account at https://bitpay.com.  
For development and testing against the bitcoin testnet, sign up at https://test.bitpay.com.

## Installation

Add this line to your application's Gemfile:

    gem 'spree_bitpay'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install spree_bitpay

Then run 

    $ rails generate spree_bitpay:install

The BitPay Spree connector receives RESTful confirmation callbacks at the `bitpay_notification_url` (typically http://<host>/spree_bitpay/notification).  This route must be available to receive messages from https://bitpay.com for proper operation.  The connector has been implemented to verify any callbacks received at this route, to prevent malicious transactions.

## Application Configuration

Once installed, configure the BitPay payment method by logging into the Admin console by browsing to Configuration > Payment Methods.

Click the  "+ New Payment Method" button and choose the provider titled `Spree::PaymentMethod::Bitpay`.  Type a unique name that will be displayed to users when selecting a payment method.

Once you click the "Create" button there will be two additional parameters that should be completed.  Input your API Key from your Bitpay dashboard, and specify an API endpoint.  For production you should use `https://bitpay.com/api`, while for testing purposes you can use `https://test.bitpay.com/api` which will monitor for payments on the bitcoin testnet.  Note that you must have a separate account and API Key for test.bitpay.com.

## User Experience

Once installed and configured, users will be able to select Bitcoin on the Payment step of the Checkout process.<commit_msg>clarify firewall changes required<commit_after># BitPay plugin for Spree Commerce
[![Build Status](https://travis-ci.org/bitpay/spree_bitpay.svg?branch=master)](https://travis-ci.org/bitpay/spree_bitpay)

BitPay Payments connector for SpreeCommerce RoR storefront.  Accept bitcoin payments with ZERO fees.  Choose remittance in your local currency or take a percentage in BTC.  

Sign up for your account at https://bitpay.com.  
For development and testing against the bitcoin testnet, sign up at https://test.bitpay.com.

## Installation

Add this line to your application's Gemfile:

    gem 'spree_bitpay'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install spree_bitpay

Then run 

    $ rails generate spree_bitpay:install

The BitPay Spree connector receives RESTful confirmation callbacks at the `bitpay_notification_url` (typically `http://<host>/spree_bitpay/notification`).  **This route must be available to receive messages from https://bitpay.com for proper operation**.  This may require changes to your network configuration if your server is behind a firewall.  The connector has been implemented to verify any callbacks received at this route, to prevent fraudulent/spoof messages.

## Application Configuration

Once installed, configure the BitPay payment method by logging into the Admin console by browsing to Configuration > Payment Methods.

Click the  "+ New Payment Method" button and choose the provider titled `Spree::PaymentMethod::Bitpay`.  Type a unique name that will be displayed to users when selecting a payment method.

Once you click the "Create" button there will be two additional parameters that should be completed.  Input your API Key from your Bitpay dashboard, and specify an API endpoint.  For production you should use `https://bitpay.com/api`, while for testing purposes you can use `https://test.bitpay.com/api` which will monitor for payments on the bitcoin testnet.  Note that you must have a separate account and API Key for test.bitpay.com.

## User Experience

Once installed and configured, users will be able to select Bitcoin on the Payment step of the Checkout process.
{'fraction_non_alphanumeric': 0.05972288580984233, 'fraction_numerical': 0.0, 'mean_word_length': 4.56781914893617, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6754019', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1037, 'n_words': 529}