app/assets/javascripts/spree/backend/payments/edit.js.coffee in spree_backend-2.3.8 vs app/assets/javascripts/spree/backend/payments/edit.js.coffee in spree_backend-2.3.9
- old
+ new
@@ -1,10 +1,10 @@
jQuery ($) ->
# Payment model
order_id = $('#payments').data('order-id')
class Payment
constructor: (id) ->
- @url = Spree.url("#{Spree.routes.payments_api(order_id)}/#{id}.json")
+ @url = Spree.url("#{Spree.routes.payments_api(order_id)}/#{id}.json" + '?token=' + Spree.api_key)
@json = $.getJSON @url.toString(), (data) =>
@data = data
if_pending: (callback) ->
@json.done (data) ->