-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update reservation status from "checkout_complete" to "created" #5
Comments
Looks like we didn't support this already. We're using this gem in combination with https://github.com/Skalar/klarna-ruby to call Klarnas RPC API for reservations. I just pushed 58b999d which allows you to update the order status. You can try tracking the gem from # Gemfile
...
gem 'klarna-checkout', github: 'Skalar/klarna-checkout-ruby', ref: 'master'
... client = Klarna::Checkout::Client.new
order = client.read_order(order_id)
order.status = 'created'
client.update_order(order) Let me know if it works and I'll publish a new version to Rubygems. |
Hello, I get the following error message: "http_status_code":403,"http_status_message":"Forbidden","internal_message":"'cart' can not be set at this time"}): $klarna_client = Klarna::Checkout::Client.new({shared_secret: 'XXX', environment: :test}) order = $klarna_client.read_order(params[:klarna_order]) I still run Klarna in test modus, but Klarna told me the it should work. |
Okay. I'll look into this later and get back to you. |
Hello, ok, I know how it works: I added some lines: if status == 'created'
|
puuuh .... it does not work ... status is set correct to "created" but all other fields get cleared. Damm! |
@8frogs got any solution? |
@rashidul0405 I made a solution for this in my fork. I added a method to activate_order which would only send the status update to the API instead of the whole order (which did not work for me; the API seems to have a couple of different fields in the German locale) |
This is a really ugly hack but it works for now
|
@atanana This works for me too, thanks! Without it I received this error when trying to update the order status and merchant reference:
|
I'am looking for a way to update only the status of a reservation:
Klarna gives a Python example:
Could you give me a hint please?
Your help is greatly appreciated.
Thanx
Jochen
The text was updated successfully, but these errors were encountered: