revo-remit 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.markdown +122 -0
- data/lib/remit.rb +132 -0
- data/lib/remit/common.rb +151 -0
- data/lib/remit/data_types.rb +265 -0
- data/lib/remit/error_codes.rb +118 -0
- data/lib/remit/get_pipeline.rb +286 -0
- data/lib/remit/inbound_request.rb +85 -0
- data/lib/remit/ipn_request.rb +8 -0
- data/lib/remit/operations/cancel.rb +20 -0
- data/lib/remit/operations/cancel_subscription_and_refund.rb +26 -0
- data/lib/remit/operations/cancel_token.rb +19 -0
- data/lib/remit/operations/fund_prepaid.rb +33 -0
- data/lib/remit/operations/get_account_activity.rb +31 -0
- data/lib/remit/operations/get_account_balance.rb +32 -0
- data/lib/remit/operations/get_all_credit_instruments.rb +20 -0
- data/lib/remit/operations/get_all_prepaid_instruments.rb +20 -0
- data/lib/remit/operations/get_debt_balance.rb +28 -0
- data/lib/remit/operations/get_outstanding_debt_balance.rb +25 -0
- data/lib/remit/operations/get_payment_instruction.rb +23 -0
- data/lib/remit/operations/get_prepaid_balance.rb +27 -0
- data/lib/remit/operations/get_recipient_verification_status.rb +25 -0
- data/lib/remit/operations/get_token_by_caller.rb +23 -0
- data/lib/remit/operations/get_token_usage.rb +22 -0
- data/lib/remit/operations/get_tokens.rb +24 -0
- data/lib/remit/operations/get_total_prepaid_liability.rb +26 -0
- data/lib/remit/operations/get_transaction.rb +18 -0
- data/lib/remit/operations/get_transaction_status.rb +28 -0
- data/lib/remit/operations/install_payment_instruction.rb +29 -0
- data/lib/remit/operations/pay.rb +31 -0
- data/lib/remit/operations/refund.rb +46 -0
- data/lib/remit/operations/reserve.rb +28 -0
- data/lib/remit/operations/settle.rb +21 -0
- data/lib/remit/operations/settle_debt.rb +28 -0
- data/lib/remit/operations/subscribe_for_caller_notification.rb +20 -0
- data/lib/remit/operations/unsubscribe_for_caller_notification.rb +19 -0
- data/lib/remit/operations/write_off_debt.rb +26 -0
- data/lib/remit/pipeline_response.rb +20 -0
- data/lib/remit/signature_utils_for_outbound.rb +74 -0
- data/lib/remit/verify_signature.rb +21 -0
- data/spec/integrations/get_account_activity_spec.rb +42 -0
- data/spec/integrations/get_tokens_spec.rb +39 -0
- data/spec/integrations/integrations_helper.rb +15 -0
- data/spec/integrations/ipn_request_spec.rb +40 -0
- data/spec/integrations/pipeline_response_spec.rb +27 -0
- data/spec/integrations/verify_signature_spec.rb +140 -0
- data/spec/mocks/CancelResponse.xml +13 -0
- data/spec/mocks/CancelSubscriptionAndRefundResponse.xml +10 -0
- data/spec/mocks/CancelTokenResponse.xml +6 -0
- data/spec/mocks/ErrorResponse.xml +15 -0
- data/spec/mocks/FundPrepaidResponse.xml +11 -0
- data/spec/mocks/GetAccountActivityResponse.xml +68 -0
- data/spec/mocks/GetAccountBalanceResponse.xml +34 -0
- data/spec/mocks/GetDebtBalanceResponse.xml +21 -0
- data/spec/mocks/GetOutstandingDebtBalanceResponse.xml +21 -0
- data/spec/mocks/GetPaymentInstructionResponse.xml +25 -0
- data/spec/mocks/GetPrepaidBalanceResponse.xml +21 -0
- data/spec/mocks/GetRecipientVerificationStatusResponse.xml +9 -0
- data/spec/mocks/GetTokenByCallerResponse.xml +22 -0
- data/spec/mocks/GetTokenUsageResponse.xml +28 -0
- data/spec/mocks/GetTokensResponse.xml +22 -0
- data/spec/mocks/GetTotalPrepaidLiabilityResponse.xml +21 -0
- data/spec/mocks/GetTransactionResponse.xml +76 -0
- data/spec/mocks/GetTransactionStatusResponse.xml +16 -0
- data/spec/mocks/InstallPaymentInstructionResponse.xml +10 -0
- data/spec/mocks/PayResponse.xml +11 -0
- data/spec/mocks/RefundResponse.xml +11 -0
- data/spec/mocks/ReserveResponse.xml +11 -0
- data/spec/mocks/SettleDebtResponse.xml +11 -0
- data/spec/mocks/SettleResponse.xml +11 -0
- data/spec/mocks/VerifySignatureResponse.xml +11 -0
- data/spec/mocks/WriteOffDebtResponse.xml +11 -0
- data/spec/mocks/errors/InvalidParameterValue.xml +10 -0
- data/spec/mocks/errors/InvalidParams_certificateUrl.xml +2 -0
- data/spec/mocks/errors/RequestExpired.xml +10 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/units/cancel_subscription_and_refund_spec.rb +29 -0
- data/spec/units/cancel_token_spec.rb +24 -0
- data/spec/units/fund_prepaid_spec.rb +28 -0
- data/spec/units/get_account_activity_spec.rb +58 -0
- data/spec/units/get_account_balance_spec.rb +28 -0
- data/spec/units/get_debt_balance_spec.rb +29 -0
- data/spec/units/get_outstanding_debt_balance_spec.rb +29 -0
- data/spec/units/get_pipeline_spec.rb +181 -0
- data/spec/units/get_prepaid_balance_spec.rb +29 -0
- data/spec/units/get_recipient_verification_status_spec.rb +26 -0
- data/spec/units/get_token_by_caller_spec.rb +56 -0
- data/spec/units/get_token_usage_spec.rb +51 -0
- data/spec/units/get_tokens_spec.rb +56 -0
- data/spec/units/get_total_prepaid_liability_spec.rb +26 -0
- data/spec/units/get_transaction_spec.rb +103 -0
- data/spec/units/get_transaction_status_spec.rb +44 -0
- data/spec/units/pay_spec.rb +112 -0
- data/spec/units/refund_spec.rb +41 -0
- data/spec/units/reserve_spec.rb +41 -0
- data/spec/units/settle_debt_spec.rb +41 -0
- data/spec/units/settle_spec.rb +41 -0
- data/spec/units/units_helper.rb +25 -0
- data/spec/units/write_off_debt_spec.rb +41 -0
- metadata +236 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/integrations_helper'
|
2
|
+
|
3
|
+
describe 'a GetTokens call' do
|
4
|
+
it_should_behave_like 'a successful response'
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
@response = remit.get_tokens
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should have a collection of tokens' do
|
12
|
+
@response.get_tokens_result.should have_at_least(1).tokens
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should have a token with all of its values set' do
|
16
|
+
token = @response.get_tokens_result.tokens.first
|
17
|
+
token.token_id.should_not be_empty
|
18
|
+
token.friendly_name.should_not be_empty
|
19
|
+
token.token_status.should_not be_empty
|
20
|
+
token.date_installed.should_not be_nil
|
21
|
+
#token.caller_installed.should_not be_empty
|
22
|
+
token.caller_reference.should_not be_empty
|
23
|
+
token.token_type.should_not be_empty
|
24
|
+
token.old_token_id.should_not be_empty
|
25
|
+
#token.payment_reason.should be_empty
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should have a token with a token ID' do
|
29
|
+
@response.get_tokens_result.tokens.first.token_id.should_not be_empty
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'should have a token with a valid token status' do
|
33
|
+
@response.get_tokens_result.tokens.first.token_status.should match(/^(IN)?ACTIVE$/i)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should have a token with a valid installation date' do
|
37
|
+
@response.get_tokens_result.tokens.first.date_installed.should be_a_kind_of(Time)
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
ACCESS_KEY = ENV['AWS_ACCESS_KEY'] || ENV['AMAZON_ACCESS_KEY_ID']
|
2
|
+
SECRET_KEY = ENV['AWS_SECRET_KEY'] || ENV['AMAZON_SECRET_ACCESS_KEY']
|
3
|
+
|
4
|
+
unless ACCESS_KEY and SECRET_KEY
|
5
|
+
raise RuntimeError, "You must set your AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables to run integration tests"
|
6
|
+
end
|
7
|
+
|
8
|
+
#def remit_api
|
9
|
+
# @remit ||= Remit::API.new(ACCESS_KEY, SECRET_KEY, true)
|
10
|
+
#end
|
11
|
+
|
12
|
+
#puts "Access key = #{ACCESS_KEY}"
|
13
|
+
#puts "Secret key = #{SECRET_KEY}"
|
14
|
+
|
15
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/integrations_helper'
|
2
|
+
|
3
|
+
describe 'an IPN request with a bad signature' do
|
4
|
+
# This needs to be updated to match the new Verify methods
|
5
|
+
# The signature does not match the one calculated for these req params by amazon. Need to get a fresh example.
|
6
|
+
# So it is currently a test that a bad signature will be verified as BAD
|
7
|
+
before(:each) do
|
8
|
+
@bad_request_params = {
|
9
|
+
"action" => "notice",
|
10
|
+
"buyerName" => "Fps Buyer",
|
11
|
+
"callerReference" => "4-8-1-3.5",
|
12
|
+
"controller" => "amazon_fps/ipn",
|
13
|
+
"operation" => "PAY",
|
14
|
+
"paymentMethod" => "CC",
|
15
|
+
"recipientEmail" => "recipient@email.url",
|
16
|
+
"recipientName" => "Fps Business",
|
17
|
+
"signatureVersion" => Remit::API::SIGNATURE_VERSION.to_s,
|
18
|
+
"signatureMethod" => "RSA-SHA1",
|
19
|
+
"certificateUrl" => "https://fps.sandbox.amazonaws.com/certs/090909/PKICert.pem",
|
20
|
+
Remit::IpnRequest::SIGNATURE_KEY => "This-is-a-bad-sig",
|
21
|
+
"status" => "SUCCESS",
|
22
|
+
"transactionAmount" => "USD 3.50",
|
23
|
+
"transactionDate" => "1224687134",
|
24
|
+
"transactionId" => "13KIGL9RC25853BGPPOS2VSKBKF2JERR3HO"
|
25
|
+
}
|
26
|
+
|
27
|
+
@request = Remit::IpnRequest.new('http://example.com/ipn/processor', @bad_request_params, remit)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should not be a valid request' do
|
31
|
+
@request.should_not be_valid
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should pass through access to given parameters' do
|
35
|
+
@request.status.should == 'SUCCESS'
|
36
|
+
@request.operation.should == 'PAY'
|
37
|
+
@request.transactionId.should == '13KIGL9RC25853BGPPOS2VSKBKF2JERR3HO'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/integrations_helper'
|
2
|
+
#require 'uri'
|
3
|
+
#require 'remit/common'
|
4
|
+
|
5
|
+
#TODO: Turn this into an integration test...
|
6
|
+
#describe "Pipeline Response should work" do
|
7
|
+
#
|
8
|
+
# before(:each) do
|
9
|
+
# params = { :status => "SA",
|
10
|
+
# :tokenID => "foo",
|
11
|
+
# :callerReference => "bar",
|
12
|
+
# :awsSignature => "7QrCpQ1nMng3Usaj8LFkeo4zorM="}
|
13
|
+
# url = URI.parse("http://example.com/payment?#{params.to_url_params}")
|
14
|
+
# @pipeline_response = Remit::PipelineResponse.new(url.path, url.query, SECRET_KEY)
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
#
|
18
|
+
# it "should be valid" do
|
19
|
+
# puts "#{@pipeline_response.inspect}"
|
20
|
+
# @pipeline_response.should be_valid
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# it "should be successful" do
|
24
|
+
# @pipeline_response.successful?.should == true
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
#end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/integrations_helper'
|
2
|
+
|
3
|
+
describe "VerifySignature API" do
|
4
|
+
|
5
|
+
#Not sure if other KEYS can validate this signature or not. Taken from a test sandbox transaction.
|
6
|
+
def correct_params
|
7
|
+
{"tokenID"=>"F36RX66AJJF8S3QZ9MP656MAZD2CL3UH5HMIFT75D5ACN6Z9FKCHESAQQXNLVSBM",
|
8
|
+
"signatureVersion"=>"2",
|
9
|
+
"callerReference"=>"OrderToken-00b6fad394cdef8f95c1dcc72e2bfae06dc09c4f",
|
10
|
+
"signature"=>"Jy7oVloTqVl1BKTnFmpiBW0Jpzr3x4E4WoIPxUQMz1vefNO3bhceHTg+zAvB52JcyS2oYmUHltep\n3ifJb+eEciRDCP+T7GjocXG9LNuGpt76MUXxbV2CGGq+gVvTs/kE5oN5kH2/51skjiFkgwl9Qfao\nuGYK9uWVGuRvL9dmhxk=",
|
11
|
+
"certificateUrl"=>"https://fps.sandbox.amazonaws.com/certs/090910/PKICert.pem?requestId=bjyoi7ibdlseql3rkc05z9rexucetcjqkdw8eneo5qlto7zp7ap",
|
12
|
+
"signatureMethod"=>"RSA-SHA1",
|
13
|
+
"expiry"=>"08/2014",
|
14
|
+
"status"=>"SC"}
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'with bad certificateUrl (whitespace)' do
|
18
|
+
before(:all) do
|
19
|
+
@params = {"tokenID"=>"F36RX66AJJF8S3QZ9MP656MAZD2CL3UH5HMIFT75D5ACN6Z9FKCHESAQQXNLVSBM",
|
20
|
+
"signatureVersion"=>"2",
|
21
|
+
"callerReference"=>"OrderToken-00b6fad394cdef8f95c1dcc72e2bfae06dc09c4f",
|
22
|
+
"signature"=>"Jy7oVloTqVl1BKTnFmpiBW0Jpzr3x4E4WoIPxUQMz1vefNO3bhceHTg+zAvB52JcyS2oYmUHltep\n3ifJb+eEciRDCP+T7GjocXG9LNuGpt76MUXxbV2CGGq+gVvTs/kE5oN5kH2/51skjiFkgwl9Qfao\nuGYK9uWVGuRvL9dmhxk=",
|
23
|
+
"certificateUrl"=>"https://fps.sandbox.amazonaws.com/certs/090
|
24
|
+
910/PKICert.pem?requestId=bjyoi7ibdlseql3rkc05z9rexucetcjqkdw8eneo5qlto7zp7ap",
|
25
|
+
"signatureMethod"=>"RSA-SHA1",
|
26
|
+
"expiry"=>"08/2014",
|
27
|
+
"status"=>"SC"}
|
28
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou", @params, remit)
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should not be valid' do
|
32
|
+
@pipeline_response.should_not be_valid
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'with bad signature (whitespace)' do
|
37
|
+
before(:all) do
|
38
|
+
@params = {"tokenID"=>"F36RX66AJJF8S3QZ9MP656MAZD2CL3UH5HMIFT75D5ACN6Z9FKCHESAQQXNLVSBM",
|
39
|
+
"signatureVersion"=>"2",
|
40
|
+
"callerReference"=>"OrderToken-00b6fad394cdef8f95c1dcc72e2bfae06dc09c4f",
|
41
|
+
"signature"=>"Jy7oVl
|
42
|
+
oTqVl1BKTnFmpiBW0Jpzr3x4E4WoIPxUQMz1vefNO3bhceHTg+zAvB52JcyS2oYmUHltep\n3ifJb+eEciRDCP+T7GjocXG9LNuGpt76MUXxbV2CGGq+gVvTs/kE5oN5kH2/51skjiFkgwl9Qfao\nuGYK9uWVGuRvL9dmhxk=",
|
43
|
+
"certificateUrl"=>"https://fps.sandbox.amazonaws.com/certs/090910/PKICert.pem?requestId=bjyoi7ibdlseql3rkc05z9rexucetcjqkdw8eneo5qlto7zp7ap",
|
44
|
+
"signatureMethod"=>"RSA-SHA1",
|
45
|
+
"expiry"=>"08/2014",
|
46
|
+
"status"=>"SC"}
|
47
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou", @params, remit)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'should not be valid' do
|
51
|
+
@pipeline_response.should_not be_valid
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
#'action' and 'controller' are auto removed by remit.
|
56
|
+
describe 'with parameters created by rails (not from Amazon, like "id")' do
|
57
|
+
before(:all) do
|
58
|
+
@params = correct_params.merge({
|
59
|
+
"action"=>"thankyou",
|
60
|
+
"id"=>"31",
|
61
|
+
"controller"=>"member/restaurants"})
|
62
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou", @params, remit)
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'should not be valid' do
|
66
|
+
@pipeline_response.should_not be_valid
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'with trailing slash on endpoint' do
|
71
|
+
before(:all) do
|
72
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou/", correct_params, remit)
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'should not be valid' do
|
76
|
+
@pipeline_response.should_not be_valid
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "with correct parameters hash" do
|
81
|
+
#'action' and 'controller' are auto removed by remit.
|
82
|
+
describe 'including action and controller added by rails' do
|
83
|
+
before(:all) do
|
84
|
+
@params = correct_params.merge({
|
85
|
+
"action"=>"thankyou",
|
86
|
+
"controller"=>"member/restaurants"})
|
87
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou", @params, remit)
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'should be valid' do
|
91
|
+
@pipeline_response.should be_valid
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe 'with trailing slash on endpoint URL' do
|
96
|
+
before(:all) do
|
97
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou/", correct_params, remit)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'should not be valid' do
|
101
|
+
@pipeline_response.should_not be_valid
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe 'without trailing slash on endpoint URL' do
|
106
|
+
before(:all) do
|
107
|
+
@pipeline_response = Remit::PipelineResponse.new("https://staging.timeperks.net/member/restaurants/31/thankyou", correct_params, remit)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'should be valid' do
|
111
|
+
@pipeline_response.should be_valid
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe "with invalid query params (id comes from rails) and building Endpoint URL from request URI" do
|
117
|
+
before(:all) do
|
118
|
+
@parameters = {"tokenID"=>"977B36S3GQ5VRXSNSZ4V2BHJEB9YB3A7MFQSF5GCK5ULGGDMNDJT6AMU1TU6A6XX", "signatureVersion"=>"2", "callerReference"=>"OrderToken-a0fff5d468263da9672a4a939a5b28086764d049", "action"=>"thankyou", "signature"=>"gaumxsAIf4SoY9gp2KWpZK9JRhPhnQ/w+DgC/VWSgw/9pur/RDVlnzGt9Btr9iX6Goc7UNB3nso7\nmm8ocodEtz8Fnsj85OD4NdQZLuFV0PIzsIWYwYfe3nOxUm08uCCJo6dPJMwIocYnGTneqYMGoFZD\nawjzOEpAz8/50lViGvs=", "certificateUrl"=>"https://fps.sandbox.amazonaws.com/certs/090910/PKICert.pem?requestId=bjyoi7ibdlseql3rkc05z9rexucetcjqkdw8eneo5qlto7zp7aq", "id"=>"38", "signatureMethod"=>"RSA-SHA1", "controller"=>"member/restaurants", "expiry"=>"07/2015", "status"=>"SC"}
|
119
|
+
url = "https://staging.timeperks.net/member/restaurants/38/thankyou?signature=gaumxsAIf4SoY9gp2KWpZK9JRhPhnQ%2Fw%2BDgC%2FVWSgw%2F9pur%2FRDVlnzGt9Btr9iX6Goc7UNB3nso7%0Amm8ocodEtz8Fnsj85OD4NdQZLuFV0PIzsIWYwYfe3nOxUm08uCCJo6dPJMwIocYnGTneqYMGoFZD%0AawjzOEpAz8%2F50lViGvs%3D&expiry=07%2F2015&signatureVersion=2&signatureMethod=RSA-SHA1&certificateUrl=https%3A%2F%2Ffps.sandbox.amazonaws.com%2Fcerts%2F090910%2FPKICert.pem%3FrequestId%3Dbjyoi7ibdlseql3rkc05z9rexucetcjqkdw8eneo5qlto7zp7aq&tokenID=977B36S3GQ5VRXSNSZ4V2BHJEB9YB3A7MFQSF5GCK5ULGGDMNDJT6AMU1TU6A6XX&status=SC&callerReference=OrderToken-a0fff5d468263da9672a4a939a5b28086764d049"
|
120
|
+
@url = URI.parse("#{url}")
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'should work when using URL to parse out params instead' do
|
124
|
+
@pipeline_response = Remit::PipelineResponse.new("#{@url.scheme}://#{@url.host}#{@url.path}", @url.query, remit)
|
125
|
+
@pipeline_response.should be_valid
|
126
|
+
end
|
127
|
+
|
128
|
+
it 'should be valid when using :skip_param_keys' do
|
129
|
+
@pipeline_response = Remit::PipelineResponse.new("#{@url.scheme}://#{@url.host}#{@url.path}", @parameters, remit, {:skip_param_keys => ['action','controller','id']})
|
130
|
+
@pipeline_response.should be_valid
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'should be valid when relying on :skip_param_keys to remove action and controller params' do
|
134
|
+
@pipeline_response = Remit::PipelineResponse.new("#{@url.scheme}://#{@url.host}#{@url.path}", @parameters, remit, {:skip_param_keys => ['id']})
|
135
|
+
@pipeline_response.should be_valid
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<CancelResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<CancelResult>
|
5
|
+
<!--Optional:-->
|
6
|
+
<TransactionId>string</TransactionId>
|
7
|
+
<!--Optional:-->
|
8
|
+
<TransactionStatus>string</TransactionStatus>
|
9
|
+
</CancelResult>
|
10
|
+
<ResponseMetadata>
|
11
|
+
<RequestId>string</RequestId>
|
12
|
+
</ResponseMetadata>
|
13
|
+
</CancelResponse>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<CancelSubscriptionAndRefundResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<CancelSubscriptionAndRefundResult>
|
5
|
+
<RefundTransactionId>string</RefundTransactionId>
|
6
|
+
</CancelSubscriptionAndRefundResult>
|
7
|
+
<ResponseMetadata>
|
8
|
+
<RequestId>string</RequestId>
|
9
|
+
</ResponseMetadata>
|
10
|
+
</CancelSubscriptionAndRefundResponse>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<ErrorResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--1 or more repetitions:-->
|
4
|
+
<Error>
|
5
|
+
<Type>string</Type>
|
6
|
+
<Code>string</Code>
|
7
|
+
<Message>string</Message>
|
8
|
+
<!--Optional:-->
|
9
|
+
<Detail>
|
10
|
+
<!--You may enter ANY elements at this point-->
|
11
|
+
<AnyElement xmlns=""/>
|
12
|
+
</Detail>
|
13
|
+
</Error>
|
14
|
+
<RequestId>string</RequestId>
|
15
|
+
</ErrorResponse>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<FundPrepaidResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<FundPrepaidResult>
|
5
|
+
<TransactionId>string</TransactionId>
|
6
|
+
<TransactionStatus>string</TransactionStatus>
|
7
|
+
</FundPrepaidResult>
|
8
|
+
<ResponseMetadata>
|
9
|
+
<RequestId>string</RequestId>
|
10
|
+
</ResponseMetadata>
|
11
|
+
</FundPrepaidResponse>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<GetAccountActivityResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<GetAccountActivityResult>
|
5
|
+
<!--Optional:-->
|
6
|
+
<BatchSize>100</BatchSize>
|
7
|
+
<!--Zero or more repetitions:-->
|
8
|
+
<Transaction>
|
9
|
+
<TransactionId>string</TransactionId>
|
10
|
+
<CallerTransactionDate>2008-09-28T18:49:45</CallerTransactionDate>
|
11
|
+
<DateReceived>2014-09-18T16:18:33</DateReceived>
|
12
|
+
<!--Optional:-->
|
13
|
+
<DateCompleted>2006-08-19T10:27:14-07:00</DateCompleted>
|
14
|
+
<TransactionAmount>
|
15
|
+
<CurrencyCode>string</CurrencyCode>
|
16
|
+
<Value>string</Value>
|
17
|
+
</TransactionAmount>
|
18
|
+
<FPSOperation>string</FPSOperation>
|
19
|
+
<TransactionStatus>string</TransactionStatus>
|
20
|
+
<!--Optional:-->
|
21
|
+
<StatusMessage>string</StatusMessage>
|
22
|
+
<!--Optional:-->
|
23
|
+
<StatusCode>string</StatusCode>
|
24
|
+
<!--Optional:-->
|
25
|
+
<OriginalTransactionId>string</OriginalTransactionId>
|
26
|
+
<!--1 or more repetitions:-->
|
27
|
+
<TransactionPart>
|
28
|
+
<!--Optional:-->
|
29
|
+
<InstrumentId>string</InstrumentId>
|
30
|
+
<Role>string</Role>
|
31
|
+
<!--Optional:-->
|
32
|
+
<Name>string</Name>
|
33
|
+
<!--Optional:-->
|
34
|
+
<Reference>string</Reference>
|
35
|
+
<!--Optional:-->
|
36
|
+
<Description>string</Description>
|
37
|
+
<!--Optional:-->
|
38
|
+
<FeesPaid>
|
39
|
+
<CurrencyCode>string</CurrencyCode>
|
40
|
+
<Value>string</Value>
|
41
|
+
</FeesPaid>
|
42
|
+
</TransactionPart>
|
43
|
+
<PaymentMethod>string</PaymentMethod>
|
44
|
+
<!--Optional:-->
|
45
|
+
<SenderName>string</SenderName>
|
46
|
+
<CallerName>string</CallerName>
|
47
|
+
<!--Optional:-->
|
48
|
+
<RecipientName>string</RecipientName>
|
49
|
+
<FPSFees>
|
50
|
+
<CurrencyCode>string</CurrencyCode>
|
51
|
+
<Value>string</Value>
|
52
|
+
</FPSFees>
|
53
|
+
<Balance>
|
54
|
+
<CurrencyCode>string</CurrencyCode>
|
55
|
+
<Value>string</Value>
|
56
|
+
</Balance>
|
57
|
+
<!--Optional:-->
|
58
|
+
<SenderTokenId>string</SenderTokenId>
|
59
|
+
<!--Optional:-->
|
60
|
+
<RecipientTokenId>string</RecipientTokenId>
|
61
|
+
</Transaction>
|
62
|
+
<!--Optional:-->
|
63
|
+
<StartTimeForNextTransaction>2009-05-16T05:42:28</StartTimeForNextTransaction>
|
64
|
+
</GetAccountActivityResult>
|
65
|
+
<ResponseMetadata>
|
66
|
+
<RequestId>string</RequestId>
|
67
|
+
</ResponseMetadata>
|
68
|
+
</GetAccountActivityResponse>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<GetAccountBalanceResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<GetAccountBalanceResult>
|
5
|
+
<!--Optional:-->
|
6
|
+
<AccountBalance>
|
7
|
+
<TotalBalance>
|
8
|
+
<CurrencyCode>string</CurrencyCode>
|
9
|
+
<Value>string</Value>
|
10
|
+
</TotalBalance>
|
11
|
+
<PendingInBalance>
|
12
|
+
<CurrencyCode>string</CurrencyCode>
|
13
|
+
<Value>string</Value>
|
14
|
+
</PendingInBalance>
|
15
|
+
<PendingOutBalance>
|
16
|
+
<CurrencyCode>string</CurrencyCode>
|
17
|
+
<Value>string</Value>
|
18
|
+
</PendingOutBalance>
|
19
|
+
<AvailableBalances>
|
20
|
+
<DisburseBalance>
|
21
|
+
<CurrencyCode>string</CurrencyCode>
|
22
|
+
<Value>string</Value>
|
23
|
+
</DisburseBalance>
|
24
|
+
<RefundBalance>
|
25
|
+
<CurrencyCode>string</CurrencyCode>
|
26
|
+
<Value>string</Value>
|
27
|
+
</RefundBalance>
|
28
|
+
</AvailableBalances>
|
29
|
+
</AccountBalance>
|
30
|
+
</GetAccountBalanceResult>
|
31
|
+
<ResponseMetadata>
|
32
|
+
<RequestId>string</RequestId>
|
33
|
+
</ResponseMetadata>
|
34
|
+
</GetAccountBalanceResponse>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<GetDebtBalanceResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
|
3
|
+
<!--Optional:-->
|
4
|
+
<GetDebtBalanceResult>
|
5
|
+
<!--Optional:-->
|
6
|
+
<DebtBalance>
|
7
|
+
<AvailableBalance>
|
8
|
+
<CurrencyCode>string</CurrencyCode>
|
9
|
+
<Value>string</Value>
|
10
|
+
</AvailableBalance>
|
11
|
+
<!--Optional:-->
|
12
|
+
<PendingOutBalance>
|
13
|
+
<CurrencyCode>string</CurrencyCode>
|
14
|
+
<Value>string</Value>
|
15
|
+
</PendingOutBalance>
|
16
|
+
</DebtBalance>
|
17
|
+
</GetDebtBalanceResult>
|
18
|
+
<ResponseMetadata>
|
19
|
+
<RequestId>string</RequestId>
|
20
|
+
</ResponseMetadata>
|
21
|
+
</GetDebtBalanceResponse>
|