bborn-simplepay 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +25 -0
- data/Manifest.txt +50 -0
- data/README.rdoc +127 -0
- data/Rakefile +25 -0
- data/lib/simplepay.rb +27 -0
- data/lib/simplepay/authentication.rb +41 -0
- data/lib/simplepay/constants.rb +64 -0
- data/lib/simplepay/errors.rb +16 -0
- data/lib/simplepay/helpers/form_helper.rb +29 -0
- data/lib/simplepay/helpers/notification_helper.rb +54 -0
- data/lib/simplepay/helpers/rails_helper.rb +40 -0
- data/lib/simplepay/rails.rb +9 -0
- data/lib/simplepay/service.rb +133 -0
- data/lib/simplepay/services/donation.rb +91 -0
- data/lib/simplepay/services/marketplace.rb +89 -0
- data/lib/simplepay/services/marketplace_policy.rb +54 -0
- data/lib/simplepay/services/standard.rb +58 -0
- data/lib/simplepay/services/subscription.rb +96 -0
- data/lib/simplepay/support.rb +16 -0
- data/lib/simplepay/support/amount.rb +55 -0
- data/lib/simplepay/support/billing_frequency.rb +14 -0
- data/lib/simplepay/support/boolean.rb +28 -0
- data/lib/simplepay/support/currency.rb +21 -0
- data/lib/simplepay/support/epoch.rb +39 -0
- data/lib/simplepay/support/field.rb +147 -0
- data/lib/simplepay/support/interval.rb +143 -0
- data/lib/simplepay/support/simple_amount.rb +37 -0
- data/lib/simplepay/support/subscription_period.rb +25 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/simplepay.gemspec +41 -0
- data/test/simplepay/helpers/test_notifier.rb +32 -0
- data/test/simplepay/services/test_donation.rb +85 -0
- data/test/simplepay/services/test_marketplace.rb +85 -0
- data/test/simplepay/services/test_marketplace_policy.rb +52 -0
- data/test/simplepay/services/test_standard.rb +71 -0
- data/test/simplepay/services/test_subscription.rb +109 -0
- data/test/simplepay/support/test_amount.rb +46 -0
- data/test/simplepay/support/test_billing_frequency.rb +43 -0
- data/test/simplepay/support/test_boolean.rb +17 -0
- data/test/simplepay/support/test_epoch.rb +34 -0
- data/test/simplepay/support/test_field.rb +99 -0
- data/test/simplepay/support/test_interval.rb +92 -0
- data/test/simplepay/support/test_simple_amount.rb +28 -0
- data/test/simplepay/support/test_subscription_period.rb +49 -0
- data/test/simplepay/test_authentication.rb +25 -0
- data/test/simplepay/test_service.rb +118 -0
- data/test/test_helper.rb +87 -0
- data/test/test_simplepay.rb +11 -0
- metadata +184 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'bigdecimal'
|
2
|
+
|
3
|
+
module Simplepay
|
4
|
+
module Support
|
5
|
+
|
6
|
+
##
|
7
|
+
# In new Amazon API requests the amount does not include the currency, SimpleAmount is used for this, for now.
|
8
|
+
#
|
9
|
+
# At the present time, Amazon only uses USD.
|
10
|
+
#
|
11
|
+
class SimpleAmount
|
12
|
+
|
13
|
+
attr_reader :amount
|
14
|
+
|
15
|
+
def initialize(amount)
|
16
|
+
self.amount = amount
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
##
|
21
|
+
# Sets the amount of the currency value, such as "1" for 1 USD. This
|
22
|
+
# amount cannot be negative.
|
23
|
+
#
|
24
|
+
def amount=(amount)
|
25
|
+
raise(ArgumentError, "Amount cannot be nil") unless amount
|
26
|
+
raise(ArgumentError, "Amount cannot be negative") if amount < 0
|
27
|
+
@amount = BigDecimal.new(amount.to_s)
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_s
|
31
|
+
"#{'%0.2f' % amount}"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'simplepay/support/interval'
|
2
|
+
|
3
|
+
module Simplepay
|
4
|
+
module Support
|
5
|
+
|
6
|
+
class SubscriptionPeriod < Interval
|
7
|
+
ALLOWED_INTERVALS = Simplepay::Intervals + ['forever']
|
8
|
+
|
9
|
+
# Limited to 3 digits.
|
10
|
+
ALLOWED_QUANTITY_RANGE = (1...1000)
|
11
|
+
|
12
|
+
##
|
13
|
+
# See Simplepay::Support::Interval.to_s for more information.
|
14
|
+
#
|
15
|
+
# If the subscription lasts "forever" then Amazon does not need an
|
16
|
+
# interval string.
|
17
|
+
#
|
18
|
+
def to_s
|
19
|
+
super unless interval == 'forever'
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/simplepay.rb'}"
|
9
|
+
puts "Loading simplepay gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/simplepay.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{bborn-simplepay}
|
5
|
+
s.version = "0.2.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Nathaniel E. Bibler"]
|
9
|
+
s.date = %q{2009-06-07}
|
10
|
+
s.description = %q{This gem provides a Rails interface to the Amazon Simple Pay payment service.}
|
11
|
+
s.email = ["gem@nathanielbibler.com"]
|
12
|
+
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
|
13
|
+
s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/simplepay.rb", "lib/simplepay/authentication.rb", "lib/simplepay/constants.rb", "lib/simplepay/errors.rb", "lib/simplepay/helpers/form_helper.rb", "lib/simplepay/helpers/notification_helper.rb", "lib/simplepay/helpers/rails_helper.rb", "lib/simplepay/rails.rb", "lib/simplepay/service.rb", "lib/simplepay/services/donation.rb", "lib/simplepay/services/marketplace.rb", "lib/simplepay/services/marketplace_policy.rb", "lib/simplepay/services/standard.rb", "lib/simplepay/services/subscription.rb", "lib/simplepay/support.rb", "lib/simplepay/support/amount.rb", "lib/simplepay/support/billing_frequency.rb", "lib/simplepay/support/boolean.rb", "lib/simplepay/support/currency.rb", "lib/simplepay/support/epoch.rb", "lib/simplepay/support/field.rb", "lib/simplepay/support/interval.rb", "lib/simplepay/support/simple_amount.rb", "lib/simplepay/support/subscription_period.rb", "script/console", "script/destroy", "script/generate", "simplepay.gemspec", "test/simplepay/helpers/test_notifier.rb", "test/simplepay/services/test_donation.rb", "test/simplepay/services/test_marketplace.rb", "test/simplepay/services/test_marketplace_policy.rb", "test/simplepay/services/test_standard.rb", "test/simplepay/services/test_subscription.rb", "test/simplepay/support/test_amount.rb", "test/simplepay/support/test_billing_frequency.rb", "test/simplepay/support/test_boolean.rb", "test/simplepay/support/test_epoch.rb", "test/simplepay/support/test_field.rb", "test/simplepay/support/test_interval.rb", "test/simplepay/support/test_subscription_period.rb", "test/simplepay/test_authentication.rb", "test/simplepay/test_service.rb", "test/test_helper.rb", "test/test_simplepay.rb"]
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.homepage = %q{http://simplepay.rubyforge.org}
|
16
|
+
s.rdoc_options = ["--main", "README.rdoc"]
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
s.rubyforge_project = %q{simplepay}
|
19
|
+
s.rubygems_version = %q{1.3.2}
|
20
|
+
s.summary = %q{This gem provides a Rails interface to the Amazon Simple Pay payment service.}
|
21
|
+
s.test_files = ["test/simplepay/helpers/test_notifier.rb", "test/simplepay/services/test_donation.rb", "test/simplepay/services/test_marketplace.rb", "test/simplepay/services/test_marketplace_policy.rb", "test/simplepay/services/test_standard.rb", "test/simplepay/services/test_subscription.rb", "test/simplepay/support/test_amount.rb", "test/simplepay/support/test_billing_frequency.rb", "test/simplepay/support/test_boolean.rb", "test/simplepay/support/test_epoch.rb", "test/simplepay/support/test_field.rb", "test/simplepay/support/test_interval.rb", "test/simplepay/support/test_simple_amount.rb", "test/simplepay/support/test_subscription_period.rb", "test/simplepay/test_authentication.rb", "test/simplepay/test_service.rb", "test/test_helper.rb", "test/test_simplepay.rb"]
|
22
|
+
|
23
|
+
if s.respond_to? :specification_version then
|
24
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
25
|
+
s.specification_version = 3
|
26
|
+
|
27
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.0.2"])
|
29
|
+
s.add_development_dependency(%q<newgem>, [">= 1.3.0"])
|
30
|
+
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
31
|
+
else
|
32
|
+
s.add_dependency(%q<activesupport>, [">= 2.0.2"])
|
33
|
+
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
34
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
35
|
+
end
|
36
|
+
else
|
37
|
+
s.add_dependency(%q<activesupport>, [">= 2.0.2"])
|
38
|
+
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
39
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../test_helper'
|
2
|
+
require "simplepay/helpers/notification_helper"
|
3
|
+
|
4
|
+
class TestNotificationClass
|
5
|
+
include Simplepay::Helpers::NotificationHelper
|
6
|
+
|
7
|
+
def testing(request_hash = {})
|
8
|
+
valid_simplepay_request?(request_hash)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class Simplepay::Helpers::TestNotificationHelper < Test::Unit::TestCase
|
13
|
+
|
14
|
+
context 'Simplepay::Helpers::NotificationHelper' do
|
15
|
+
|
16
|
+
setup do
|
17
|
+
@notifier = TestNotificationClass.new
|
18
|
+
end
|
19
|
+
|
20
|
+
should 'defer to Simplepay::Authentication.authentic?' do
|
21
|
+
Simplepay::Authentication.expects(:authentic?).with({:test => 'testing'}, 'signed').returns(true)
|
22
|
+
assert @notifier.testing({:test => 'testing', :signature => 'signed'})
|
23
|
+
end
|
24
|
+
|
25
|
+
should 'work with string hash keys' do
|
26
|
+
Simplepay::Authentication.expects(:authentic?).with({:test => 'testing'}, 'signed').returns(true)
|
27
|
+
assert @notifier.testing({"test" => 'testing', "signature" => 'signed'})
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../test_helper'
|
2
|
+
require 'simplepay/services/donation'
|
3
|
+
|
4
|
+
class Simplepay::Services::TestDonation < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def self.model_class; Simplepay::Services::Donation; end
|
7
|
+
|
8
|
+
context 'Simplepay::Services::Donation' do
|
9
|
+
|
10
|
+
should_have_service_field :access_key,
|
11
|
+
:as => 'accessKey',
|
12
|
+
:required => true
|
13
|
+
|
14
|
+
should_have_service_field :signature,
|
15
|
+
:as => 'signature',
|
16
|
+
:required => true
|
17
|
+
|
18
|
+
should_have_service_field :account_id,
|
19
|
+
:as => 'amazonPaymentsAccountId',
|
20
|
+
:required => true
|
21
|
+
|
22
|
+
should_have_service_field :description,
|
23
|
+
:as => 'description',
|
24
|
+
:required => true
|
25
|
+
|
26
|
+
should_have_service_field :amount,
|
27
|
+
:as => 'amount',
|
28
|
+
:required => true,
|
29
|
+
:class => Simplepay::Support::Amount
|
30
|
+
|
31
|
+
should_have_service_field :recipient_email,
|
32
|
+
:as => 'recipientEmail',
|
33
|
+
:required => false
|
34
|
+
|
35
|
+
should_have_service_field :fixed_marketplace_fee,
|
36
|
+
:as => 'fixedMarketplaceFee',
|
37
|
+
:required => false,
|
38
|
+
:class => Simplepay::Support::Amount
|
39
|
+
|
40
|
+
should_have_service_field :variable_marketplace_fee,
|
41
|
+
:as => 'variableMarketplaceFee',
|
42
|
+
:required => false
|
43
|
+
|
44
|
+
should_have_service_field :cobranding_style,
|
45
|
+
:as => 'cobrandingStyle',
|
46
|
+
:required => true
|
47
|
+
|
48
|
+
should_have_service_field :reference_id,
|
49
|
+
:as => 'referenceId',
|
50
|
+
:required => false
|
51
|
+
|
52
|
+
should_have_service_field :immediate_return,
|
53
|
+
:as => 'immediateReturn',
|
54
|
+
:required => false,
|
55
|
+
:class => Simplepay::Support::Boolean
|
56
|
+
|
57
|
+
should_have_service_field :collect_shipping_address,
|
58
|
+
:as => 'collectShippingAddress',
|
59
|
+
:required => false,
|
60
|
+
:class => Simplepay::Support::Boolean
|
61
|
+
|
62
|
+
should_have_service_field :process_immediately,
|
63
|
+
:as => 'processImmediate',
|
64
|
+
:required => false,
|
65
|
+
:class => Simplepay::Support::Boolean
|
66
|
+
|
67
|
+
should_have_service_field :return_url,
|
68
|
+
:as => 'returnUrl',
|
69
|
+
:required => false
|
70
|
+
|
71
|
+
should_have_service_field :abandon_url,
|
72
|
+
:as => 'abandonUrl',
|
73
|
+
:required => false
|
74
|
+
|
75
|
+
should_have_service_field :ipn_url,
|
76
|
+
:as => 'ipnUrl',
|
77
|
+
:required => false
|
78
|
+
|
79
|
+
should_have_service_field :donation_widget,
|
80
|
+
:as => 'isDonationWidget',
|
81
|
+
:required => true
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../test_helper'
|
2
|
+
require 'simplepay/services/marketplace'
|
3
|
+
|
4
|
+
class Simplepay::Services::TestMarketplace < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def self.model_class; Simplepay::Services::Marketplace; end
|
7
|
+
|
8
|
+
context 'Simplepay::Services::Marketplace' do
|
9
|
+
|
10
|
+
should_have_service_field :access_key,
|
11
|
+
:as => 'accessKey',
|
12
|
+
:required => true
|
13
|
+
|
14
|
+
should_have_service_field :signature,
|
15
|
+
:as => 'signature',
|
16
|
+
:required => true
|
17
|
+
|
18
|
+
should_have_service_field :account_id,
|
19
|
+
:as => 'amazonPaymentsAccountId',
|
20
|
+
:required => true
|
21
|
+
|
22
|
+
should_have_service_field :description,
|
23
|
+
:as => 'description',
|
24
|
+
:required => true
|
25
|
+
|
26
|
+
should_have_service_field :amount,
|
27
|
+
:as => 'amount',
|
28
|
+
:required => true,
|
29
|
+
:class => Simplepay::Support::Amount
|
30
|
+
|
31
|
+
should_have_service_field :recipient_email,
|
32
|
+
:as => 'recipientEmail',
|
33
|
+
:required => true
|
34
|
+
|
35
|
+
should_have_service_field :fixed_marketplace_fee,
|
36
|
+
:as => 'fixedMarketplaceFee',
|
37
|
+
:required => true,
|
38
|
+
:class => Simplepay::Support::Amount
|
39
|
+
|
40
|
+
should_have_service_field :variable_marketplace_fee,
|
41
|
+
:as => 'variableMarketplaceFee',
|
42
|
+
:required => true
|
43
|
+
|
44
|
+
should_have_service_field :cobranding_style,
|
45
|
+
:as => 'cobrandingStyle',
|
46
|
+
:required => true
|
47
|
+
|
48
|
+
should_have_service_field :reference_id,
|
49
|
+
:as => 'referenceId',
|
50
|
+
:required => false
|
51
|
+
|
52
|
+
should_have_service_field :immediate_return,
|
53
|
+
:as => 'immediateReturn',
|
54
|
+
:required => false,
|
55
|
+
:class => Simplepay::Support::Boolean
|
56
|
+
|
57
|
+
should_have_service_field :collect_shipping_address,
|
58
|
+
:as => 'collectShippingAddress',
|
59
|
+
:required => false,
|
60
|
+
:class => Simplepay::Support::Boolean
|
61
|
+
|
62
|
+
should_have_service_field :process_immediately,
|
63
|
+
:as => 'processImmediate',
|
64
|
+
:required => false,
|
65
|
+
:class => Simplepay::Support::Boolean
|
66
|
+
|
67
|
+
should_have_service_field :return_url,
|
68
|
+
:as => 'returnUrl',
|
69
|
+
:required => false
|
70
|
+
|
71
|
+
should_have_service_field :abandon_url,
|
72
|
+
:as => 'abandonUrl',
|
73
|
+
:required => false
|
74
|
+
|
75
|
+
should_have_service_field :ipn_url,
|
76
|
+
:as => 'ipnUrl',
|
77
|
+
:required => false
|
78
|
+
|
79
|
+
should_have_service_field :donation_widget,
|
80
|
+
:as => 'isDonationWidget',
|
81
|
+
:required => false
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../test_helper'
|
2
|
+
require 'simplepay/services/marketplace_policy'
|
3
|
+
|
4
|
+
class Simplepay::Services::TestMarketplacePolicy < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def self.model_class; Simplepay::Services::MarketplacePolicy; end
|
7
|
+
|
8
|
+
context 'Simplepay::Services::MarketplacePolicy' do
|
9
|
+
|
10
|
+
should_have_service_field :access_key,
|
11
|
+
:as => 'callerKey',
|
12
|
+
:required => true
|
13
|
+
|
14
|
+
should_have_service_field :signature,
|
15
|
+
:as => 'awsSignature',
|
16
|
+
:required => true
|
17
|
+
|
18
|
+
should_have_service_field :account_id,
|
19
|
+
:as => 'callerAccountId',
|
20
|
+
:required => true
|
21
|
+
|
22
|
+
should_have_service_field :max_fixed_fee,
|
23
|
+
:as => 'maxFixedFee',
|
24
|
+
:required => true
|
25
|
+
|
26
|
+
should_have_service_field :max_variable_fee,
|
27
|
+
:as => 'maxVariableFee',
|
28
|
+
:required => true
|
29
|
+
|
30
|
+
should_have_service_field :return_url,
|
31
|
+
:as => 'returnUrl',
|
32
|
+
:required => true
|
33
|
+
|
34
|
+
should_have_service_field :recipient_pays_fee,
|
35
|
+
:as => 'recipientPaysFee',
|
36
|
+
:required => true
|
37
|
+
|
38
|
+
should_have_service_field :reference_id,
|
39
|
+
:as => 'callerReference',
|
40
|
+
:required => true
|
41
|
+
|
42
|
+
should_have_service_field :collect_email_address,
|
43
|
+
:as => 'collectEmailAddress',
|
44
|
+
:required => true
|
45
|
+
|
46
|
+
should_have_service_field :pipeline_name,
|
47
|
+
:as => 'pipelineName',
|
48
|
+
:required => true
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../test_helper'
|
2
|
+
require 'simplepay/services/standard'
|
3
|
+
|
4
|
+
class Simplepay::Services::TestStandard < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def self.model_class; Simplepay::Services::Standard; end
|
7
|
+
|
8
|
+
context 'Simplepay::Services::Standard' do
|
9
|
+
|
10
|
+
should_have_service_field :abandon_url,
|
11
|
+
:as => 'abandonUrl',
|
12
|
+
:required => false
|
13
|
+
|
14
|
+
should_have_service_field :access_key,
|
15
|
+
:as => 'accessKey',
|
16
|
+
:required => true
|
17
|
+
|
18
|
+
should_have_service_field :amount,
|
19
|
+
:as => 'amount',
|
20
|
+
:required => true
|
21
|
+
|
22
|
+
should_have_service_field :cobranding_style,
|
23
|
+
:as => 'cobrandingStyle',
|
24
|
+
:required => false
|
25
|
+
|
26
|
+
should_have_service_field :collect_shipping_address,
|
27
|
+
:as => 'collectShippingAddress',
|
28
|
+
:required => false,
|
29
|
+
:class => Simplepay::Support::Boolean
|
30
|
+
|
31
|
+
should_have_service_field :description,
|
32
|
+
:as => 'description',
|
33
|
+
:required => true
|
34
|
+
|
35
|
+
should_have_service_field :immediate_return,
|
36
|
+
:as => 'immediateReturn',
|
37
|
+
:required => false,
|
38
|
+
:class => Simplepay::Support::Boolean
|
39
|
+
|
40
|
+
should_have_service_field :ipn_url,
|
41
|
+
:as => 'ipnUrl',
|
42
|
+
:required => false
|
43
|
+
|
44
|
+
should_have_service_field :process_immediate,
|
45
|
+
:as => 'processImmediate',
|
46
|
+
:required => false,
|
47
|
+
:class => Simplepay::Support::Boolean
|
48
|
+
|
49
|
+
should_have_service_field :reference_id,
|
50
|
+
:as => 'referenceId',
|
51
|
+
:required => false
|
52
|
+
|
53
|
+
should_have_service_field :return_url,
|
54
|
+
:as => 'returnUrl',
|
55
|
+
:required => false
|
56
|
+
|
57
|
+
should_have_service_field :signature,
|
58
|
+
:as => 'signature',
|
59
|
+
:required => true
|
60
|
+
|
61
|
+
should_have_service_field :signature_method,
|
62
|
+
:as => 'signatureMethod',
|
63
|
+
:required => true
|
64
|
+
|
65
|
+
should_have_service_field :signature_version,
|
66
|
+
:as => 'signatureVersion',
|
67
|
+
:required => true
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|