nbudin-google4r-checkout 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGES +83 -0
- data/LICENSE +22 -0
- data/README +58 -0
- data/Rakefile +80 -0
- data/VERSION +1 -0
- data/lib/google4r/checkout/commands.rb +515 -0
- data/lib/google4r/checkout/frontend.rb +204 -0
- data/lib/google4r/checkout/merchant_calculation.rb +321 -0
- data/lib/google4r/checkout/notifications.rb +708 -0
- data/lib/google4r/checkout/shared.rb +1249 -0
- data/lib/google4r/checkout/utils.rb +94 -0
- data/lib/google4r/checkout/xml_generation.rb +920 -0
- data/lib/google4r/checkout.rb +34 -0
- data/test/frontend_configuration.rb +13 -0
- data/test/integration/checkout_command_test.rb +246 -0
- data/test/test_helper.rb +115 -0
- data/test/unit/add_merchant_order_number_command_test.rb +70 -0
- data/test/unit/add_tracking_data_command_test.rb +75 -0
- data/test/unit/address_test.rb +131 -0
- data/test/unit/anonymous_address_test.rb +75 -0
- data/test/unit/archive_order_command_test.rb +66 -0
- data/test/unit/area_test.rb +44 -0
- data/test/unit/authorization_amount_notification_test.rb +69 -0
- data/test/unit/authorize_order_command_test.rb +66 -0
- data/test/unit/backorder_items_command_test.rb +83 -0
- data/test/unit/callback_handler_test.rb +83 -0
- data/test/unit/cancel_items_command_test.rb +89 -0
- data/test/unit/cancel_order_command_test.rb +83 -0
- data/test/unit/carrier_calculated_shipping_test.rb +57 -0
- data/test/unit/charge_amount_notification_test.rb +64 -0
- data/test/unit/charge_order_command_test.rb +77 -0
- data/test/unit/chargeback_amount_notification_test.rb +65 -0
- data/test/unit/checkout_command_test.rb +125 -0
- data/test/unit/checkout_command_xml_generator_test.rb +218 -0
- data/test/unit/command_test.rb +116 -0
- data/test/unit/deliver_order_command_test.rb +70 -0
- data/test/unit/delivery_method_test.rb +42 -0
- data/test/unit/digital_content_test.rb +105 -0
- data/test/unit/flat_rate_shipping_test.rb +132 -0
- data/test/unit/frontend_test.rb +136 -0
- data/test/unit/item_info_test.rb +69 -0
- data/test/unit/item_test.rb +171 -0
- data/test/unit/marketing_preferences_test.rb +65 -0
- data/test/unit/merchant_calculated_shipping_test.rb +172 -0
- data/test/unit/merchant_calculation_callback_test.rb +137 -0
- data/test/unit/merchant_calculation_result_test.rb +78 -0
- data/test/unit/merchant_calculation_results_test.rb +178 -0
- data/test/unit/merchant_code_result_test.rb +51 -0
- data/test/unit/merchant_code_test.rb +122 -0
- data/test/unit/new_order_notification_test.rb +115 -0
- data/test/unit/notification_acknowledgement_test.rb +67 -0
- data/test/unit/notification_handler_test.rb +113 -0
- data/test/unit/order_adjustment_test.rb +119 -0
- data/test/unit/order_state_change_notification_test.rb +158 -0
- data/test/unit/pickup_shipping_test.rb +70 -0
- data/test/unit/postal_area_test.rb +71 -0
- data/test/unit/private_data_parser_test.rb +68 -0
- data/test/unit/refund_amount_notification_test.rb +65 -0
- data/test/unit/refund_order_command_test.rb +86 -0
- data/test/unit/reset_items_shipping_information_command_test.rb +83 -0
- data/test/unit/return_items_command_test.rb +83 -0
- data/test/unit/risk_information_notification_test.rb +98 -0
- data/test/unit/send_buyer_message_command_test.rb +73 -0
- data/test/unit/ship_items_command_test.rb +101 -0
- data/test/unit/shipping_adjustment_test.rb +100 -0
- data/test/unit/shopping_cart_test.rb +146 -0
- data/test/unit/tax_rule_test.rb +70 -0
- data/test/unit/tax_table_test.rb +82 -0
- data/test/unit/tracking_data_test.rb +54 -0
- data/test/unit/unarchive_order_command_test.rb +66 -0
- data/test/unit/us_country_area_test.rb +76 -0
- data/test/unit/us_state_area_test.rb +70 -0
- data/test/unit/us_zip_area_test.rb +66 -0
- data/test/unit/world_area_test.rb +48 -0
- data/test/xml/apiv2.xsd +997 -0
- data/test/xml/test_check_persisting_works_expected.xml +213 -0
- data/var/cacert.pem +7815 -0
- metadata +200 -0
@@ -0,0 +1,213 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<checkout-shopping-cart xmlns='http://checkout.google.com/schema/2'>
|
3
|
+
<shopping-cart>
|
4
|
+
<cart-expiration>
|
5
|
+
<good-until-date>2007-11-29T15:33:20Z</good-until-date>
|
6
|
+
</cart-expiration>
|
7
|
+
<merchant-private-data>
|
8
|
+
<we>can</we>
|
9
|
+
<we>pass</we>
|
10
|
+
<we>in</we>
|
11
|
+
<we>some</we>
|
12
|
+
<we>data</we>
|
13
|
+
<we>here</we>
|
14
|
+
</merchant-private-data>
|
15
|
+
<items>
|
16
|
+
<item>
|
17
|
+
<item-name>Item Name 1</item-name>
|
18
|
+
<item-description>Description 1</item-description>
|
19
|
+
<unit-price currency='USD'>10.00</unit-price>
|
20
|
+
<quantity>2</quantity>
|
21
|
+
<merchant-item-id>Merchant ID 1</merchant-item-id>
|
22
|
+
<merchant-private-item-data>
|
23
|
+
<bars>
|
24
|
+
<bar>1</bar>
|
25
|
+
<bar>2</bar>
|
26
|
+
</bars>
|
27
|
+
<some>
|
28
|
+
<data>Yeah, Yeah!</data>
|
29
|
+
</some>
|
30
|
+
</merchant-private-item-data>
|
31
|
+
<tax-table-selector>Special Table</tax-table-selector>
|
32
|
+
</item>
|
33
|
+
<item>
|
34
|
+
<item-name>Item Name 2</item-name>
|
35
|
+
<item-description>Description 2</item-description>
|
36
|
+
<unit-price currency='USD'>20.00</unit-price>
|
37
|
+
<quantity>4</quantity>
|
38
|
+
<merchant-item-id>Merchant ID 2</merchant-item-id>
|
39
|
+
</item>
|
40
|
+
<item>
|
41
|
+
<item-name>Item Name 3</item-name>
|
42
|
+
<item-description>Description 3</item-description>
|
43
|
+
<unit-price currency='USD'>30.00</unit-price>
|
44
|
+
<quantity>6</quantity>
|
45
|
+
<merchant-item-id>Merchant ID 3</merchant-item-id>
|
46
|
+
<tax-table-selector>Special Table</tax-table-selector>
|
47
|
+
</item>
|
48
|
+
<item>
|
49
|
+
<item-name>Item Name 4</item-name>
|
50
|
+
<item-description>Description 4</item-description>
|
51
|
+
<unit-price currency='USD'>40.00</unit-price>
|
52
|
+
<quantity>8</quantity>
|
53
|
+
<merchant-item-id>Merchant ID 4</merchant-item-id>
|
54
|
+
</item>
|
55
|
+
<item>
|
56
|
+
<item-name>Item Name 5</item-name>
|
57
|
+
<item-description>Description 5</item-description>
|
58
|
+
<unit-price currency='USD'>50.00</unit-price>
|
59
|
+
<quantity>10</quantity>
|
60
|
+
<merchant-item-id>Merchant ID 5</merchant-item-id>
|
61
|
+
<tax-table-selector>Special Table</tax-table-selector>
|
62
|
+
</item>
|
63
|
+
<item>
|
64
|
+
<item-name>Item Name 6</item-name>
|
65
|
+
<item-description>Description 6</item-description>
|
66
|
+
<unit-price currency='USD'>60.00</unit-price>
|
67
|
+
<quantity>12</quantity>
|
68
|
+
<merchant-item-id>Merchant ID 6</merchant-item-id>
|
69
|
+
</item>
|
70
|
+
<item>
|
71
|
+
<item-name>Item Name 7</item-name>
|
72
|
+
<item-description>Description 7</item-description>
|
73
|
+
<unit-price currency='USD'>70.00</unit-price>
|
74
|
+
<quantity>14</quantity>
|
75
|
+
<merchant-item-id>Merchant ID 7</merchant-item-id>
|
76
|
+
<tax-table-selector>Special Table</tax-table-selector>
|
77
|
+
</item>
|
78
|
+
<item>
|
79
|
+
<item-name>Item Name 8</item-name>
|
80
|
+
<item-description>Description 8</item-description>
|
81
|
+
<unit-price currency='USD'>80.00</unit-price>
|
82
|
+
<quantity>16</quantity>
|
83
|
+
<merchant-item-id>Merchant ID 8</merchant-item-id>
|
84
|
+
</item>
|
85
|
+
<item>
|
86
|
+
<item-name>Item Name 9</item-name>
|
87
|
+
<item-description>Description 9</item-description>
|
88
|
+
<unit-price currency='USD'>90.00</unit-price>
|
89
|
+
<quantity>18</quantity>
|
90
|
+
<merchant-item-id>Merchant ID 9</merchant-item-id>
|
91
|
+
<tax-table-selector>Special Table</tax-table-selector>
|
92
|
+
</item>
|
93
|
+
<item>
|
94
|
+
<item-name>Item Name 10</item-name>
|
95
|
+
<item-description>Description 10</item-description>
|
96
|
+
<unit-price currency='USD'>100.00</unit-price>
|
97
|
+
<quantity>20</quantity>
|
98
|
+
<merchant-item-id>Merchant ID 10</merchant-item-id>
|
99
|
+
</item>
|
100
|
+
</items>
|
101
|
+
</shopping-cart>
|
102
|
+
<checkout-flow-support>
|
103
|
+
<merchant-checkout-flow-support>
|
104
|
+
<tax-tables>
|
105
|
+
<default-tax-table>
|
106
|
+
<tax-rules>
|
107
|
+
<default-tax-rule>
|
108
|
+
<shipping-taxed>false</shipping-taxed>
|
109
|
+
<rate>0.04</rate>
|
110
|
+
<tax-area>
|
111
|
+
<us-country-area country-area='ALL'/>
|
112
|
+
</tax-area>
|
113
|
+
</default-tax-rule>
|
114
|
+
<default-tax-rule>
|
115
|
+
<shipping-taxed>true</shipping-taxed>
|
116
|
+
<rate>0.03</rate>
|
117
|
+
<tax-area>
|
118
|
+
<postal-area>
|
119
|
+
<country-code>GB</country-code>
|
120
|
+
<postal-code-pattern>S6*</postal-code-pattern>
|
121
|
+
</postal-area>
|
122
|
+
</tax-area>
|
123
|
+
</default-tax-rule>
|
124
|
+
<default-tax-rule>
|
125
|
+
<shipping-taxed>false</shipping-taxed>
|
126
|
+
<rate>0.07</rate>
|
127
|
+
<tax-area>
|
128
|
+
<postal-area>
|
129
|
+
<country-code>GB</country-code>
|
130
|
+
</postal-area>
|
131
|
+
</tax-area>
|
132
|
+
</default-tax-rule>
|
133
|
+
<default-tax-rule>
|
134
|
+
<shipping-taxed>true</shipping-taxed>
|
135
|
+
<rate>0.1</rate>
|
136
|
+
<tax-area>
|
137
|
+
<world-area/>
|
138
|
+
</tax-area>
|
139
|
+
</default-tax-rule>
|
140
|
+
</tax-rules>
|
141
|
+
</default-tax-table>
|
142
|
+
<alternate-tax-tables>
|
143
|
+
<alternate-tax-table name='Special Table' standalone='false'>
|
144
|
+
<alternate-tax-rules>
|
145
|
+
<alternate-tax-rule>
|
146
|
+
<rate>0.02</rate>
|
147
|
+
<tax-area>
|
148
|
+
<us-country-area country-area='ALL'/>
|
149
|
+
</tax-area>
|
150
|
+
</alternate-tax-rule>
|
151
|
+
</alternate-tax-rules>
|
152
|
+
</alternate-tax-table>
|
153
|
+
</alternate-tax-tables>
|
154
|
+
</tax-tables>
|
155
|
+
<continue-shopping-url>http://wwww.example.com/continue_shopping</continue-shopping-url>
|
156
|
+
<edit-cart-url>http://wwww.example.com/edit_cart</edit-cart-url>
|
157
|
+
<request-buyer-phone-number>false</request-buyer-phone-number>
|
158
|
+
<merchant-calculations>
|
159
|
+
<merchant-calculations-url>http://www.example.com/merchant_calcuations</merchant-calculations-url>
|
160
|
+
<accept-merchant-coupons>true</accept-merchant-coupons>
|
161
|
+
<accept-gift-certificates>true</accept-gift-certificates>
|
162
|
+
</merchant-calculations>
|
163
|
+
<platform-id>1234567890</platform-id>
|
164
|
+
<shipping-methods>
|
165
|
+
<pickup name='Pickup Test Shipping'>
|
166
|
+
<price currency='USD'>1.00</price>
|
167
|
+
</pickup>
|
168
|
+
<flat-rate-shipping name='State Test Shipping'>
|
169
|
+
<price currency='USD'>1.00</price>
|
170
|
+
<shipping-restrictions>
|
171
|
+
<allowed-areas>
|
172
|
+
<us-state-area>
|
173
|
+
<state>CA</state>
|
174
|
+
</us-state-area>
|
175
|
+
</allowed-areas>
|
176
|
+
<excluded-areas>
|
177
|
+
<us-state-area>
|
178
|
+
<state>TX</state>
|
179
|
+
</us-state-area>
|
180
|
+
</excluded-areas>
|
181
|
+
</shipping-restrictions>
|
182
|
+
</flat-rate-shipping>
|
183
|
+
<flat-rate-shipping name='Country Area Test Shipping'>
|
184
|
+
<price currency='USD'>1.00</price>
|
185
|
+
<shipping-restrictions>
|
186
|
+
<allowed-areas>
|
187
|
+
<us-country-area country-area='FULL_50_STATES'/>
|
188
|
+
</allowed-areas>
|
189
|
+
<excluded-areas>
|
190
|
+
<us-country-area country-area='CONTINENTAL_48'/>
|
191
|
+
</excluded-areas>
|
192
|
+
</shipping-restrictions>
|
193
|
+
</flat-rate-shipping>
|
194
|
+
<flat-rate-shipping name='Zip Test Shipping'>
|
195
|
+
<price currency='USD'>1.00</price>
|
196
|
+
<shipping-restrictions>
|
197
|
+
<allowed-areas>
|
198
|
+
<us-zip-area>
|
199
|
+
<zip-pattern>1*</zip-pattern>
|
200
|
+
</us-zip-area>
|
201
|
+
</allowed-areas>
|
202
|
+
<excluded-areas>
|
203
|
+
<us-zip-area>
|
204
|
+
<zip-pattern>12*</zip-pattern>
|
205
|
+
</us-zip-area>
|
206
|
+
</excluded-areas>
|
207
|
+
</shipping-restrictions>
|
208
|
+
</flat-rate-shipping>
|
209
|
+
</shipping-methods>
|
210
|
+
<analytics-data>abcd1234defgh5678ijklmn</analytics-data>
|
211
|
+
</merchant-checkout-flow-support>
|
212
|
+
</checkout-flow-support>
|
213
|
+
</checkout-shopping-cart>
|