Skip to content

Instantly share code, notes, and snippets.

@jarretgabel
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarretgabel/7f1cc9e6fb46ef1e1998 to your computer and use it in GitHub Desktop.
Save jarretgabel/7f1cc9e6fb46ef1e1998 to your computer and use it in GitHub Desktop.
Spree Checkout API "payment amount" issue

I'm having a problem with the spree checkout api, specifically the "payment" state. The "amount" property, equal to my order total, that's being passed into the API is cleared out so when the API creates a new payment for that order, the total isn't translated into the new payment.

I noticed some stuff in the Checkout.rb update_params_payment_source method but i can't track down why that "amount" property isn't being transfered when it rebuilds the payment. Here are screenshot references of my issue

Notice the "amount" property in the first payment object "0.0". It *should be the value of the order like "25.00"

API request to transition from checkout state "payment" to "confirm"

http://cl.ly/image/3Z3o3n1L050v

API response after transition from checkout state "payment" to "confirm"

http://cl.ly/image/3y11243f1F0d

Am I calling the API incorrectly? What am i missing? Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment