Shopify/active_merchant — pull request #1384 by craigchristenson (2014-09-16 19:51:09+00:00)
Title: 2Checkout API Gateway Addition

Add support for [2Checkout's API integration] (https://www.2checkout.com/documentation/payment-api/)

Some notes on the integration:
* Payment API sales capture automatically with in 48 hours of being placed so there is no capture endpoint.

* Payment API sales can only be created using a single use token that is created by the 2co.js JavaScript library. For the remote tests to pass, you will need to generate a token and add it to to the fixture. Sandbox credentials should be specified on a per user bases but you can use the following to verify the tests.
login: '901254435'
api_key: '9DEE4568-B5F4-4BA1-925A-6565C03200A9'
token: Use [http://jsbin.com/mibojono/117/](http://jsbin.com/mibojono/117/) to generate a token

* Payment API sales require that the `billing_address` and `order_id` are passed in the options. So an exception is raised when they are missing.

* Payment API sales can be created by either specifying a `total` or an array of `items`. If items are passed the total parameter is ignored and the sale total is calculated based on the item quantity/price.

Please let me know if you have any questions or would like me to make any changes.

Thanks!