braintree 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -89,7 +89,7 @@ module Braintree
|
|
89
89
|
|
90
90
|
def self._create_signature # :nodoc:
|
91
91
|
[
|
92
|
-
:amount, :customer_id, :merchant_account_id, :order_id, :payment_method_token, :type,
|
92
|
+
:amount, :customer_id, :merchant_account_id, :order_id, :payment_method_token, :shipping_address_id, :type,
|
93
93
|
{:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number]},
|
94
94
|
{:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
|
95
95
|
{
|
data/lib/braintree/version.rb
CHANGED
@@ -904,6 +904,29 @@ describe Braintree::Transaction do
|
|
904
904
|
transaction.vault_credit_card.token.should == payment_mehtod_token
|
905
905
|
end
|
906
906
|
|
907
|
+
it "can specify existing shipping address" do
|
908
|
+
customer = Braintree::Customer.create!(
|
909
|
+
:credit_card => {
|
910
|
+
:number => Braintree::Test::CreditCardNumbers::Visa,
|
911
|
+
:expiration_date => "05/2010"
|
912
|
+
}
|
913
|
+
)
|
914
|
+
address = Braintree::Address.create!(
|
915
|
+
:customer_id => customer.id,
|
916
|
+
:street_address => '123 Fake St.'
|
917
|
+
)
|
918
|
+
result = Braintree::Transaction.sale(
|
919
|
+
:amount => "100",
|
920
|
+
:customer_id => customer.id,
|
921
|
+
:shipping_address_id => address.id
|
922
|
+
)
|
923
|
+
result.success?.should == true
|
924
|
+
transaction = result.transaction
|
925
|
+
transaction.shipping_details.street_address.should == '123 Fake St.'
|
926
|
+
transaction.customer_details.id.should == customer.id
|
927
|
+
transaction.shipping_details.id.should == address.id
|
928
|
+
end
|
929
|
+
|
907
930
|
it "returns an error result if validations fail" do
|
908
931
|
params = {
|
909
932
|
:transaction => {
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braintree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 2
|
7
8
|
- 6
|
8
|
-
-
|
9
|
-
version: 2.6.
|
9
|
+
- 3
|
10
|
+
version: 2.6.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Braintree Payment Solutions
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-01-10 00:00:00 -06:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: builder
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
27
30
|
segments:
|
28
31
|
- 0
|
29
32
|
version: "0"
|
@@ -143,23 +146,27 @@ rdoc_options: []
|
|
143
146
|
require_paths:
|
144
147
|
- lib
|
145
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
146
150
|
requirements:
|
147
151
|
- - ">="
|
148
152
|
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
149
154
|
segments:
|
150
155
|
- 0
|
151
156
|
version: "0"
|
152
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
153
159
|
requirements:
|
154
160
|
- - ">="
|
155
161
|
- !ruby/object:Gem::Version
|
162
|
+
hash: 3
|
156
163
|
segments:
|
157
164
|
- 0
|
158
165
|
version: "0"
|
159
166
|
requirements: []
|
160
167
|
|
161
168
|
rubyforge_project: braintree
|
162
|
-
rubygems_version: 1.3.
|
169
|
+
rubygems_version: 1.3.7
|
163
170
|
signing_key:
|
164
171
|
specification_version: 3
|
165
172
|
summary: Braintree Gateway Ruby Client Library
|