google_checkout 0.1.1 → 0.1.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/lib/google-checkout.rb +6 -5
- metadata +2 -2
data/lib/google-checkout.rb
CHANGED
|
@@ -100,13 +100,14 @@ module GoogleCheckout
|
|
|
100
100
|
@contents.size
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
def
|
|
104
|
-
(@live_system ? 'checkout' :
|
|
103
|
+
def submit_prefix
|
|
104
|
+
(@live_system ? 'checkout.google.com' :
|
|
105
|
+
'sandbox.google.com/checkout')
|
|
105
106
|
end
|
|
106
107
|
|
|
107
108
|
# This method returns the URL to which the form should be submitted.
|
|
108
109
|
def submit_url
|
|
109
|
-
["https://#{
|
|
110
|
+
["https://#{submit_prefix}/cws/v2/Merchant",
|
|
110
111
|
@merchant_id,
|
|
111
112
|
'checkout'
|
|
112
113
|
].join('/')
|
|
@@ -180,7 +181,7 @@ module GoogleCheckout
|
|
|
180
181
|
xml.tag!('merchant-checkout-flow-support') {
|
|
181
182
|
xml.tag!('shipping-methods') {
|
|
182
183
|
xml.tag!('flat-rate-shipping', :name =>'Shipping') {
|
|
183
|
-
shipping_cost_xml
|
|
184
|
+
xml.text! shipping_cost_xml
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
}
|
|
@@ -275,7 +276,7 @@ module GoogleCheckout
|
|
|
275
276
|
|
|
276
277
|
path = opts.map { |k,v| "#{k}=#{v}" }.join('&')
|
|
277
278
|
|
|
278
|
-
"http://#{
|
|
279
|
+
"http://#{submit_prefix}/buttons/#{bname}?#{path}"
|
|
279
280
|
end
|
|
280
281
|
end
|
|
281
282
|
end
|
metadata
CHANGED