spree_billing_sisow 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,281 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head data-hook="admin_inside_head">
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+
9
+
10
+ <title>
11
+ Spree Administration:
12
+ Payments
13
+ </title>
14
+
15
+ <link rel="stylesheet" media="all" href="/assets/spree/backend/all-7a9f9297e55c2d8089e033e69e2a1458be789bdf1ea980f6d285886026badd52.css" />
16
+
17
+ <script>
18
+ SpreePaths = {"mounted_at":"/","admin":"admin/"}
19
+ </script>
20
+
21
+ <script src="/assets/spree/backend/all-da2e1beed5f92ec67ec299f8a83b4d6cf6858f47fe7f75de11c11732253a9542.js"></script>
22
+ <script>
23
+ Spree.translations = {"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"add":"Add","are_you_sure":"Are you sure?","are_you_sure_delete":"Are you sure you want to delete this record?","bill_address":"Bill Address","cancel":"Cancel","choose_a_customer":"Choose a customer","confirm_delete":"Confirm Deletion","currency_separator":".","cut":"Cut","date_picker":"yy/mm/dd","destroy":"Destroy","edit":"Edit","first_day":0,"find_a_taxon":"Find a Taxon","item_stock_placeholder":"Choose location","loading":"Loading","month_names":["January","February","March","April","May","June","July","August","September","October","November","December"],"more":"More","name":"Name","new_taxon":"New Taxon","next":"Next","no_results":"No results","option_type_placeholder":"Choose an option type","paste":"Paste","previous":"Previous","remove":"Remove","rename":"Rename","save":"Save","searching":"Searching","server_error":"The server returned an error","sku":"SKU","type_to_search":"Type to search","taxon_placeholder":"Add a Taxon","taxonomy_tree_error":"The requested change has not been accepted and the tree has been returned to its previous state, please try again.","tags_placeholder":"Add Tags","tracking":"Tracking","variant_placeholder":"Choose a variant","value":"Value"}
24
+ </script>
25
+
26
+
27
+
28
+ <script>
29
+ //<![CDATA[
30
+
31
+ var AUTH_TOKEN = "ChOY7Xhalzz/0+gPrNGFJqzsqnkhCqx7H+pRA+dbs7axuI2D3EeChSlPPk53bGgZu9MpMifN0wdVh0uZF5zB7Q==";
32
+
33
+
34
+ //]]>
35
+ </script>
36
+ <script type="text/javascript">
37
+ jQuery(document).ready(function(){
38
+ $("label:contains('iDeal')").hide();
39
+ $("label:contains('iDeal') input").disable();
40
+ });
41
+ </script>
42
+
43
+
44
+ </head>
45
+
46
+ <body class="admin">
47
+
48
+ <div id="progress">
49
+ <div class="alert alert-info alert-progress">
50
+ <div class="spinner">Loading...</div>
51
+ <div class="progress-message">Loading...</div>
52
+ </div>
53
+ </div>
54
+
55
+ <header class="header logged-in">
56
+
57
+ <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
58
+ <div class="container-fluid">
59
+ <div class="row">
60
+ <div class="navbar-header col-xs-3 col-md-2">
61
+ <a class="logo navbar-brand" href="/admin"><img id="logo" src="/assets/admin/logo-80200db37ace2294842fdb8cadf550b3681426b5551d89ad8fc4c0a53249d729.png" /></a>
62
+ <span class="navbar-toggle" id="sidebar-toggle">
63
+ <span class="icon-bar"></span>
64
+ <span class="icon-bar"></span>
65
+ <span class="icon-bar"></span>
66
+ </span>
67
+ </div>
68
+ <div class="col-xs-9 col-md-10">
69
+ <div class="navbar-right">
70
+
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </nav>
76
+
77
+ </header>
78
+
79
+
80
+ <div id="wrapper" class="container-fluid ">
81
+ <div class="row">
82
+
83
+ <div class="col-xs-3 col-md-2 sidebar" id="main-sidebar" data-hook="admin_tabs">
84
+ <ul class="nav nav-sidebar">
85
+ <li class="sidebar-menu-item selected"><a class="icon-link with-tip action-shopping-cart" href="/admin/orders"><span class="icon icon-shopping-cart"></span> <span class="text">Orders</span></a></li>
86
+ </ul>
87
+
88
+ <ul class="nav nav-sidebar">
89
+ <li class="sidebar-menu-item"><a data-toggle="collapse" data-parent="#sidebar" href="#sidebar-returns"><span class="icon icon-transfer"></span><span class="text"> Returns</span><span class="icon icon-chevron-left pull-right"></span></a><ul id="sidebar-returns" class="collapse nav nav-pills nav-stacked" data-hook="admin_returns_sub_tabs">
90
+ <li class="sidebar-menu-item"><a href="/admin/return_authorizations">Return Authorizations</a></li>
91
+ <li class="sidebar-menu-item"><a href="/admin/customer_returns">Customer Returns</a></li>
92
+ </ul>
93
+ </li>
94
+ </ul>
95
+
96
+ <ul class="nav nav-sidebar">
97
+ <li class="sidebar-menu-item"><a data-toggle="collapse" data-parent="#sidebar" href="#sidebar-product"><span class="icon icon-th-large"></span><span class="text"> Products</span><span class="icon icon-chevron-left pull-right"></span></a><ul id="sidebar-product" class="collapse nav nav-pills nav-stacked" data-hook="admin_product_sub_tabs">
98
+ <li class="sidebar-menu-item"><a href="/admin/products">Products</a></li>
99
+ <li class="sidebar-menu-item"><a href="/admin/option_types">Option Types</a></li>
100
+ <li class="sidebar-menu-item"><a href="/admin/properties">Properties</a></li>
101
+ <li class="sidebar-menu-item"><a href="/admin/prototypes">Prototypes</a></li>
102
+ <li class="sidebar-menu-item"><a href="/admin/taxonomies">Taxonomies</a></li>
103
+ <li class="sidebar-menu-item"><a href="/admin/taxons">Taxons</a></li>
104
+ </ul>
105
+ </li>
106
+ </ul>
107
+
108
+ <ul class="nav nav-sidebar">
109
+ <li class="sidebar-menu-item"><a class="icon-link with-tip action-file" href="/admin/reports"><span class="icon icon-file"></span> <span class="text">Reports</span></a></li>
110
+ </ul>
111
+
112
+ <ul class="nav nav-sidebar">
113
+ <li class="sidebar-menu-item"><a data-toggle="collapse" data-parent="#sidebar" href="#sidebar-promotions"><span class="icon icon-gift"></span><span class="text"> Promotions</span><span class="icon icon-chevron-left pull-right"></span></a><ul id="sidebar-promotions" class="collapse nav nav-pills nav-stacked" data-hook="admin_promotion_sub_tabs">
114
+ <li class="sidebar-menu-item"><a href="/admin/promotions">Promotions</a></li>
115
+ <li class="sidebar-menu-item"><a href="/admin/promotion_categories">Promotion Categories</a></li>
116
+ </ul>
117
+ </li>
118
+ </ul>
119
+
120
+ <ul class="nav nav-sidebar">
121
+ <li class="sidebar-menu-item"><a class="icon-link with-tip action-user" href="/admin/users"><span class="icon icon-user"></span> <span class="text">Users</span></a></li>
122
+ </ul>
123
+
124
+ <ul class="nav nav-sidebar">
125
+ <li class="sidebar-menu-item"><a data-toggle="collapse" data-parent="#sidebar" href="#sidebar-configuration"><span class="icon icon-wrench"></span><span class="text"> Configurations</span><span class="icon icon-chevron-left pull-right"></span></a><ul data-hook="admin_configurations_sidebar_menu" class="collapse nav nav-pills nav-stacked" id="sidebar-configuration">
126
+ <li class="sidebar-menu-item"><a href="/admin/general_settings/edit">General Settings</a></li>
127
+ <li class="sidebar-menu-item"><a href="/admin/stores">Stores</a></li>
128
+ <li class="sidebar-menu-item"><a href="/admin/tax_categories">Tax Categories</a></li>
129
+ <li class="sidebar-menu-item"><a href="/admin/tax_rates">Tax Rates</a></li>
130
+ <li class="sidebar-menu-item"><a href="/admin/zones">Zones</a></li>
131
+ <li class="sidebar-menu-item"><a href="/admin/countries">Countries</a></li>
132
+
133
+ <li class="sidebar-menu-item"><a href="/admin/countries/1/states">States</a></li>
134
+
135
+ <li class="sidebar-menu-item"><a href="/admin/payment_methods">Payment Methods</a></li>
136
+ <li class="sidebar-menu-item"><a href="/admin/shipping_methods">Shipping Methods</a></li>
137
+ <li class="sidebar-menu-item"><a href="/admin/shipping_categories">Shipping Categories</a></li>
138
+ <li class="sidebar-menu-item"><a href="/admin/stock_transfers">Stock Transfers</a></li>
139
+ <li class="sidebar-menu-item"><a href="/admin/stock_locations">Stock Locations</a></li>
140
+ <li class="sidebar-menu-item"><a href="/admin/store_credit_categories">Store Credit Categories</a></li>
141
+ <li class="sidebar-menu-item"><a href="/admin/refund_reasons">Refund Reasons</a></li>
142
+ <li class="sidebar-menu-item"><a href="/admin/reimbursement_types">Reimbursement Types</a></li>
143
+ <li class="sidebar-menu-item"><a href="/admin/return_authorization_reasons">Return Authorization Reasons</a></li>
144
+ <li class="sidebar-menu-item"><a href="/admin/roles">Roles</a></li>
145
+ <li class="sidebar-menu-item"><a href="/admin/sisow/edit">Sisow configuration</a></li>
146
+ </ul>
147
+ </li>
148
+ </ul>
149
+
150
+
151
+ <div class="spree-version hidden-xs hidden-sm">
152
+ 3.7.3
153
+ </div>
154
+
155
+ </div>
156
+
157
+ <div class="col-xs-9 col-xs-offset-3 col-md-10 col-md-offset-2 main" id="main-part">
158
+
159
+ <div class="content-header page-header">
160
+ <div class="row">
161
+ <h1 class="col-xs-12">
162
+ <a href="/admin/orders">Orders</a> /
163
+ <a href="/admin/orders/R225048329/edit">R225048329</a>
164
+ / New Payment
165
+
166
+ </h1>
167
+
168
+
169
+ </div>
170
+ </div>
171
+
172
+
173
+ <div class="row">
174
+ <div class="col-xs-12"><div class="alert alert-danger alert-auto-disappear"><button name="button" type="submit" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>Payment could not be created.</div></div>
175
+
176
+ <div class="with-sidebar col-xs-8 col-md-9" id="content" data-hook>
177
+
178
+
179
+
180
+
181
+
182
+ <div id="errorExplanation" class="errorExplanation alert alert-danger" data-hook>
183
+ <p>
184
+ <strong>1 error prohibited this record from being saved:</strong><br/>
185
+ </p>
186
+ <ul class="ul-with-markup">
187
+ <li>Source can&#39;t be blank</li>
188
+ </ul>
189
+ </div>
190
+
191
+
192
+ <form class="new_payment" id="new_payment" action="/admin/orders/R225048329/payments" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" />
193
+ <fieldset>
194
+ <div data-hook="admin_payment_form_fields">
195
+ <div class="form-group">
196
+ <label for="payment_amount">Amount</label>
197
+ <input value="29.99" class="form-control" type="text" name="payment[amount]" id="payment_amount" />
198
+ </div>
199
+ <div class="form-group">
200
+ <strong>Payment Method</strong>
201
+ <div class="radio" data-id="check">
202
+ <label data-hook="payment_method_field">
203
+ <input type="radio" name="payment[payment_method_id]" id="payment_payment_method_id_1" value="1" class="payment_methods_radios" />
204
+ Check
205
+ </label>
206
+ </div>
207
+ <div class="radio" data-id="ideal">
208
+ <label data-hook="payment_method_field">
209
+ <input type="radio" name="payment[payment_method_id]" id="payment_payment_method_id_2" value="2" class="payment_methods_radios" checked="checked" />
210
+ iDeal
211
+ </label>
212
+ </div>
213
+
214
+ <div class="payment-method-settings">
215
+
216
+ <div class="payment-methods" id="payment_method_1">
217
+ </div>
218
+
219
+ <div class="payment-methods" id="payment_method_2">
220
+
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+
226
+
227
+ <div class="form-actions" data-hook="buttons">
228
+ <button name="button" type="submit" class="btn btn-primary " data-disable-with="Saving..."><span class="icon icon-save"></span> Update</button>
229
+ </div>
230
+ </fieldset>
231
+ </form>
232
+
233
+ </div>
234
+
235
+ <div class="col-xs-4 col-md-3">
236
+ <aside id="sidebar" class="main-right-sidebar" data-hook>
237
+ <ul class="nav nav-pills nav-stacked" data-hook="admin_order_tabs">
238
+ <li data-hook='admin_order_tabs_cart_details'>
239
+ <a class="icon-link with-tip action-edit" href="http://www.example.com/admin/orders/R225048329/cart"><span class="icon icon-edit"></span> <span class="text">Cart</span></a>
240
+ </li>
241
+
242
+ <li data-hook='admin_order_tabs_store_details'>
243
+ <a class="icon-link with-tip action-home" href="http://www.example.com/admin/orders/R225048329/store"><span class="icon icon-home"></span> <span class="text">Store</span></a>
244
+ </li>
245
+
246
+ <li data-hook='admin_order_tabs_customer_details'>
247
+ <a class="icon-link with-tip action-user" href="http://www.example.com/admin/orders/R225048329/customer"><span class="icon icon-user"></span> <span class="text">Customer</span></a>
248
+ </li>
249
+
250
+ <li data-hook='admin_order_tabs_shipment_details'>
251
+ <a class="icon-link with-tip action-road" href="http://www.example.com/admin/orders/R225048329/edit"><span class="icon icon-road"></span> <span class="text">Shipments</span></a>
252
+ </li>
253
+
254
+ <li data-hook='admin_order_tabs_adjustments'>
255
+ <a class="icon-link with-tip action-wrench" href="http://www.example.com/admin/orders/R225048329/adjustments"><span class="icon icon-wrench"></span> <span class="text">Adjustments</span></a>
256
+ </li>
257
+
258
+ <li class="active" data-hook='admin_order_tabs_payments'>
259
+ <a class="icon-link with-tip action-credit-card" href="http://www.example.com/admin/orders/R225048329/payments"><span class="icon icon-credit-card"></span> <span class="text">Payments</span></a>
260
+ </li>
261
+
262
+
263
+
264
+ <li data-hook='admin_order_tabs_state_changes'>
265
+ <a class="icon-link with-tip action-refresh" href="http://www.example.com/admin/orders/R225048329/state_changes"><span class="icon icon-refresh"></span> <span class="text">State changes</span></a>
266
+ </li>
267
+ </ul>
268
+
269
+ </aside>
270
+
271
+ </div>
272
+ </div>
273
+
274
+
275
+ </div>
276
+ </div>
277
+ </div>
278
+
279
+ <div data-hook="admin_footer_scripts"></div>
280
+ </body>
281
+ </html>
@@ -44,5 +44,63 @@ feature "Administer" do
44
44
  expect(page).to have_checked_field "Debug mode"
45
45
  end
46
46
  end
47
+
48
+ context "initialiate payments in backend" do
49
+ let(:user) { create(:user) }
50
+ let(:order) { OrderWalkthrough.up_to(:delivery) }
51
+ let(:sisow_request_url) do
52
+ "http://www.sisow.nl/Sisow/iDeal/RestHandler.ashx/TransactionRequest"
53
+ end
54
+ let(:redirect_url_response) { stored_response("ideal_redirect_url_output") }
55
+ let(:sisow_request_params) do
56
+ { amount: "2999",
57
+ callbackurl: "http://www.example.com/sisow/#{order.number}",
58
+ cancelurl: "http://www.example.com/orders/#{order.number}/checkout/sisow_cancel",
59
+ description: "Spree Test Store - Order: #{order.number}",
60
+ issuerid: "09", # Triodos Bank
61
+ merchantid: '2537407799',
62
+ notifyurl: "http://www.example.com/sisow/#{order.number}",
63
+ payment: "ideal",
64
+ purchaseid: order.number,
65
+ returnurl: "http://www.example.com/orders/#{order.number}/checkout/sisow_return",
66
+ shop_id: "" }
67
+ end
68
+
69
+ before do
70
+ stub_user_with_order(user, order)
71
+
72
+ stub_request(:get, sisow_request_url).
73
+ with(query: hash_including(sisow_request_params)).
74
+ to_return(redirect_url_response)
75
+
76
+ visit spree.admin_orders_path
77
+ uncheck "Only show complete orders"
78
+ click_button "Filter Results"
79
+ end
80
+
81
+ it "can pay with iDeal" do
82
+ Spree::PaymentMethod::SisowBilling::Ideal.create!(name: "iDeal")
83
+
84
+ click_link order.number
85
+ click_link "Payments"
86
+ choose "iDeal"
87
+ click_button "Update"
88
+
89
+ # We need to fix this bug.
90
+ expect(page).to have_content("Source can't be blank")
91
+ end
92
+
93
+ it "can pay with creditcard" do
94
+ Spree::PaymentMethod::SisowBilling::Creditcard.create!(name: "CC")
95
+
96
+ click_link order.number
97
+ click_link "Payments"
98
+ choose "CC"
99
+ click_button "Update"
100
+
101
+ # We need to fix this bug.
102
+ expect(page).to have_content("Source can't be blank")
103
+ end
104
+ end
47
105
  end
48
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_billing_sisow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sjors Baltus
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-10-16 00:00:00.000000000 Z
12
+ date: 2019-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -250,10 +250,12 @@ files:
250
250
  - app/models/spree/sisow_transaction.rb
251
251
  - app/overrides/admin_decorator.rb
252
252
  - app/views/spree/admin/payments/source_forms/_bancontact.html.erb
253
+ - app/views/spree/admin/payments/source_forms/_creditcard.html.erb
253
254
  - app/views/spree/admin/payments/source_forms/_ideal.html.erb
254
255
  - app/views/spree/admin/payments/source_forms/_paypalec.html.erb
255
256
  - app/views/spree/admin/payments/source_forms/_sofort.html.erb
256
257
  - app/views/spree/admin/payments/source_views/_bancontact.html.erb
258
+ - app/views/spree/admin/payments/source_views/_creditcard.html.erb
257
259
  - app/views/spree/admin/payments/source_views/_ideal.html.erb
258
260
  - app/views/spree/admin/payments/source_views/_sofort.html.erb
259
261
  - app/views/spree/admin/shared/_configurations_menu_sisow.html.erb
@@ -773,6 +775,14 @@ files:
773
775
  - spec/dummy/public/assets/spree/frontend/checkout/shipment-9295a502364634d0279a37cf8b01f068adc338048fb1319162372ab527b86d4e.js
774
776
  - spec/dummy/public/assets/spree/frontend/checkout/shipment-9295a502364634d0279a37cf8b01f068adc338048fb1319162372ab527b86d4e.js.gz
775
777
  - spec/dummy/public/favicon.ico
778
+ - spec/dummy/tmp/capybara/capybara-201911011430474572758620.html
779
+ - spec/dummy/tmp/capybara/capybara-201911011431505777475649.html
780
+ - spec/dummy/tmp/capybara/capybara-201911011433364536468467.html
781
+ - spec/dummy/tmp/capybara/capybara-201911011433561400549457.html
782
+ - spec/dummy/tmp/capybara/capybara-201911011434195588687897.html
783
+ - spec/dummy/tmp/capybara/capybara-201911011435078889255594.html
784
+ - spec/dummy/tmp/capybara/capybara-201911011436218114868754.html
785
+ - spec/dummy/tmp/capybara/capybara-201911011436469459729472.html
776
786
  - spec/dummy/tmp/development_secret.txt
777
787
  - spec/dummy/vendor/assets/javascripts/spree/backend/all.js
778
788
  - spec/dummy/vendor/assets/javascripts/spree/frontend/all.js
@@ -1325,6 +1335,14 @@ test_files:
1325
1335
  - spec/dummy/public/assets/spree/frontend/checkout/shipment-9295a502364634d0279a37cf8b01f068adc338048fb1319162372ab527b86d4e.js
1326
1336
  - spec/dummy/public/assets/spree/frontend/checkout/shipment-9295a502364634d0279a37cf8b01f068adc338048fb1319162372ab527b86d4e.js.gz
1327
1337
  - spec/dummy/public/favicon.ico
1338
+ - spec/dummy/tmp/capybara/capybara-201911011430474572758620.html
1339
+ - spec/dummy/tmp/capybara/capybara-201911011431505777475649.html
1340
+ - spec/dummy/tmp/capybara/capybara-201911011433364536468467.html
1341
+ - spec/dummy/tmp/capybara/capybara-201911011433561400549457.html
1342
+ - spec/dummy/tmp/capybara/capybara-201911011434195588687897.html
1343
+ - spec/dummy/tmp/capybara/capybara-201911011435078889255594.html
1344
+ - spec/dummy/tmp/capybara/capybara-201911011436218114868754.html
1345
+ - spec/dummy/tmp/capybara/capybara-201911011436469459729472.html
1328
1346
  - spec/dummy/tmp/development_secret.txt
1329
1347
  - spec/dummy/vendor/assets/javascripts/spree/backend/all.js
1330
1348
  - spec/dummy/vendor/assets/javascripts/spree/frontend/all.js