app/assets/javascripts/spree/backend/payments/edit.js.coffee in spree_backend-3.0.0.rc4 vs app/assets/javascripts/spree/backend/payments/edit.js.coffee in spree_backend-3.0.0
- 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) ->