Handling for order changes
-
Hi Sean
Testing your plugin lately, so far only in test mode, but looks pretty good so far. One use-case I wanted to account for is changes to the order total, in particular if the customer wants to order less or I want to give an extra discount: anything that reduces the charge. I tried it and saw that on the strip dashboard the original authorized charge just gets captured. Does your plugin support capturing less than what was authorized?
John
-
Hey John,
Looks like Stripe does support that.
https://stripe.com/blog/auth-capture
So I’ll see what I can do to add that feature. Doesn’t seem to hard.
Cheers,
Sean
Hey John,
Looks like Stripe does support that, https://stripe.com/blog/auth-capture So I’ll work on adding the feature to my plugin.
Cheers,
Sean
All Set, added to the order admin box. Near the bottom, fills in the original price but you can capture less.
Cheers,
Sean
[Moderator Note: Please ensure that you are embedding links correctly in your posts.]
Hi Sean,
Thanks for adding support for capturing reduced-amount orders. I tried a bunch of scenarios using/not using the new field at the bottom of the order screen and my impression is that it will be confusing for admins, since they have to make sure they do their change, then save the order (saving updates the amount in the capture field you added), then click the capture button you added. If the user instead does: change->save->complete->save OR change->complete->save, the original amount authorized is charged to the card (ie user must remember to click the capture button or the full amount will be charged).
I think it would be a better behavior to transparently process the order as was done in the previous versions: when the admin changes the order to completed state and saves, striper does submits the updated total to stripe.com. I think it will be the cause of fewer headaches for the admin.
The way I foresaw it working was: if the order is being reduced, the admin consciously removes items and recalculates taxes and the total, then marks it complete and does a save to capture the (reduced) funds and notify the customer that the order is complete. In the case where a customer is adding more to the order, the admin knows the order has to go back to pending and a new invoice with pay link has to be to sent and the old authorization to cancel. So there is little danger an admin will accidentally capture the original amount on increased orders.Bottom line, and sorry for this long ramble, is there any advantage in exposing the capture button/field?
John
Gotcha, agreed, looks like I overcomplicated the matter.
I’ll move it to just look if the new amount upon capture is less than the original amount and charge that. I routed the code through the same function, so should be relatively easy to make that change.
All set, download 0.11
Cheers,
Sean
Thanks Sean. I’ll test some more with .11 and let you know how it goes.
John
So it appears to me that whether or not I have “Enable Authorization & Capture” checked or not in the settings, it always sends it to Stripe as an Authorization only and does not complete the capture automatically.
I’m not really sure what the settings is intended to do actually – by checking that is it saying that it will automatically authorize AND check it simultaneously? (which is what I’d like)
OR is it saying that it will turn on the Auth and Cap feature of Stripe, thus requiring you to manually capture after the card has been authorized?Either way, could someone check this out and let me know if I’m missing something? For me it’s not giving me an option to both authorize and capture simultaneously.
Thanks much for putting this plugin out there – glad someone was willing to!
kevin
One thing I should mention for above is that I’m testing using the “Add Order”, and Customer Invoice method through the backend rather than making a direct purchase of a product through the front-end store.
Not sure if this makes a difference. I see a custom field that seems to appear “auth_capture” at some point and not sure if that happens both ways for both orders created on the front end vs orders created on the backend.
Thanks,
kevin
Hi Sean,
Tested .11 and found it to work as expected for reduced-charge orders.
Great job adding the feature.BTW, related to ruess’ remarks, all the testing I’ve done so far with the auth and capture setting shows no difference in behavior whether it’s turned on or off.
Thanks,
John
Hey John & Ruess,
I fixed the capture bug in 0.14, I think I’m getting to close to releasing 1.0, hopefully.
I also moved the javascript to a separate file to make things cleaner, you both seem like competent users so if you both wouldn’t mind testing as well, and giving me a thumbs up, that would be very much appreciated, and give me a higher level of confidence.
Cheers,
Sean
Sean, I just saw your update (.14) before you posted your response and it’s testing perfect so far!
Thanks for your incredibly quick response! Feeling confident about taking orders now!
kevin
Hi Sean
I installed .14 and tried to make 2 orders from the web. Both failed
on order submit with a message from stripe saying:“Payment error:You must supply either a card or a customer number…”
At the back end the orders were created, but there seems to be some striper internal error because unlike the previous behavior, no custom fields were created in the failed orders (eg key or transaction_id).
Are the old versions of the plugin available to revert back to (eg .12)?
Thanks,
John
Oh, I see now there was a bug in .14. I’ll look for the next update. Still, how do I revert to an older version, just in case?
Thanks,
John
Hey John can you possibly get me a URL where you have 0.14 installed?
I changed out the system to use an external JavaScript file its a better setup, but I need to see what you issue is. Are you by chance making the orders from the backend or the frontend?
If I can’t figure it out tonight I’ll revert the changes.
The topic ‘Handling for order changes’ is closed to new replies.