Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (44 sloc) 1.536 kb
bb957a44 » cainlevy
2010-10-28 moving stuff around
1 require 'uri'
2 require 'base64'
3 require 'openssl'
4
4e4fb886 » cainlevy
2010-10-28 initial: api works, a few calls implemented, some cleanup and tests p…
5 require 'rubygems'
6 require 'rest_client'
7 require 'multi_xml'
029eb1f6 » cainlevy
2011-05-27 tests in both rails 2.3.11 and rails 3.0.7
8 require 'active_support' # camelcase, underscore
9 require 'active_support/inflector'
4e4fb886 » cainlevy
2010-10-28 initial: api works, a few calls implemented, some cleanup and tests p…
10
e36c5613 » cainlevy
2011-03-08 aaaaaand final name is AmazonFlexPay
11 require 'amazon_flex_pay/signing'
12 require 'amazon_flex_pay/model'
13 require 'amazon_flex_pay/data_types'
14 require 'amazon_flex_pay/enumerations'
f99d78e6 » cainlevy
2010-10-28 can initiate pipelines
15
e36c5613 » cainlevy
2011-03-08 aaaaaand final name is AmazonFlexPay
16 require 'amazon_flex_pay/api'
17 require 'amazon_flex_pay/pipelines'
f99d78e6 » cainlevy
2010-10-28 can initiate pipelines
18
e36c5613 » cainlevy
2011-03-08 aaaaaand final name is AmazonFlexPay
19 module AmazonFlexPay
ac42d4b4 » cainlevy
2011-11-14 0.9.7
20 VERSION = '0.9.7'
74b020f1 » cainlevy
2011-11-14 update to 2011-09-20 for revised GetRecipientVerificationStatus respo…
21 API_VERSION = '2011-09-20'
f99d78e6 » cainlevy
2010-10-28 can initiate pipelines
22 PIPELINE_VERSION = '2009-01-09'
4e4fb886 » cainlevy
2010-10-28 initial: api works, a few calls implemented, some cleanup and tests p…
23
24 class << self
25 attr_accessor :access_key
26 attr_accessor :secret_key
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
27
ddc2bee9 » cainlevy
2011-03-08 rdoc'd!
28 # The URL used for API calls.
29 #
30 # Defaults to the sandbox unless you set it explicitly or call <tt>go_live!</tt>.
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
31 def api_endpoint
32 @api_endpoint ||= 'https://fps.sandbox.amazonaws.com/'
33 end
ddc2bee9 » cainlevy
2011-03-08 rdoc'd!
34 attr_writer :api_endpoint
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
35
ddc2bee9 » cainlevy
2011-03-08 rdoc'd!
36 # The URL used for pipeline redirects.
37 #
38 # Defaults to the sandbox unless you set it explicitly or call <tt>go_live!</tt>.
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
39 def pipeline_endpoint
40 @pipeline_endpoint ||= 'https://authorize.payments-sandbox.amazon.com/cobranded-ui/actions/start'
41 end
ddc2bee9 » cainlevy
2011-03-08 rdoc'd!
42 attr_writer :pipeline_endpoint
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
43
ddc2bee9 » cainlevy
2011-03-08 rdoc'd!
44 # By default all API calls and pipeline redirects are in the Amazon Payments sandbox.
45 #
e36c5613 » cainlevy
2011-03-08 aaaaaand final name is AmazonFlexPay
46 # Call <tt>AmazonFlexPay.go_live!</tt> to enable live transactions and real money in this environment.
09c5a87a » cainlevy
2010-10-28 default to sandbox, with method to set endpoints for live
47 def go_live!
48 self.api_endpoint = 'https://fps.amazonaws.com/'
49 self.pipeline_endpoint = 'https://authorize.payments.amazon.com/cobranded-ui/actions/start'
50 end
4e4fb886 » cainlevy
2010-10-28 initial: api works, a few calls implemented, some cleanup and tests p…
51 end
52
53 end
Something went wrong with that request. Please try again.