Releases: mejuri-inc/flowcommerce_spree
Releases · mejuri-inc/flowcommerce_spree
Release v0.0.11
- Refactor to avoid duplicating code
- Pass currencies to prince_range method to not iterate over unneeded ones.
Release v0.0.10
- Updating the capture_upserted_v2 webhook to validate if order has payments present. If it does it will process the capture and If not it will schedule a job to do it. because of this I moved some code into a new method that would be call from within the job as well.
- Creating a new job update_payment_capture_worker.rb that would process the capture. This worker is configured to try processing the capture up to three times. If there is a problem while running it will notify us via Slack.
- Moving shared code between workers inside a new file flow_io_worker.rb so it can be shared between Flow workers.
Improvements for Gateway::FlowIo
- Updating OrderSync to send the variant's price instead of price_cost if no data from flow is stored in the variant.
- Setting Spree::Gateway::FlowIo#payment_profiles_supported? to return false.
- Adding Spree::Gateway::FlowIo#credit method to process correctly the refund upon creating a return authorization.
- Updating Spree::Gateway::FlowIo#map_refund_to_payment to set the source as the original payment (for consistency with other payment methods)
General improvements to Flow product synchronization
- Spree::Calculator::FlowIo stores the allocation data within the order's flow_data
- Adding general improvements for pushing and pulling product's data to Flow when updating products in Spree.
- Adding a new service to fetch product's data from Flow. This is required to avoid using the webhook ItemUpserted which generates lots of problems on flow queues.
- Adding new worker to handle the single item service call. If this job can fail up to three times, after that it will notify us in our slack channel of the error. For this it will use sidekiq.
- Adding coverage for services to pull product's information from Flow.
Changing Flow Session creation strategy to use country instead of IP.
- Changing session creation strategy based on IP to Country ISO code.
General Improvements on relation to Experience handling when turn on/off
Small improvements related to Flow experience validation and handling:
- CurrentZoneLoader#current_zone will force refreshing the zone if the zone stored in the session is not active. This will force orders to use a new active zone or eventually default to International Zone.
- OrderUpdater will allow updating orders that are associated to experiences that are it archiving status. This will allow avoiding issues for users that were completing the checkout when the experience started being archived.
Webhook security handling, webhook general refactor and quality life improvements.
Pre-release
- Adding possibility to configure HTTP Basic authentication for securing the FlowcommerceSpree::WebhooksController.
- Introducing several code improvements for webhooks.
- Adding useful messages within Spree Admin to easily identify Orders associated to a Flow experience.
- Adding coverage across the gem.
Session handling changed to FlowJS, inventory checking, payment gateway methods added
Pre-release
- Changing flow.io session management to be held by FlowJS library on frontend
- Syncing the order to flow.io when the user is redirected to flow.io checkout page
- Implementing order and payments state management with the OrderUpdater service object
- Adding InventoryController for checking item stock availability
- Mapping the payments, payment capture events and credit cards to Spree DB
- Implementing refund, void and cancel methods for the Spree::Gateway::FlowIo
Order syncing, transition to checkout page, capture payments, tax and shipment calculators
Order syncing, transition to checkout page, capture payments, tax and shipment calculators
Pre-release
Pre-release
Implemented:
- OrderSync service object, which is sending the order data and attributes to flow.io on a
sync_to_flow_io
added to Spree::Order - The workflow of transition to flow.io checkout page via checkout_tokens, and back to the main app's thank_you page on order completion
- The
capture_upserted_v2
hook method has been implemented for storing payment captures into the order metadata - Added new Spree::Calculator::Flowcommerce model.
- This calculator is configured to request Flow the tax information, and will return the tax amount based on it.
- The calculator will not calculate taxes for orders that are in cart, address or delivery, to make sure to only call Flow when Flow has the tax calculated on their side.
- The information from flow is currently being cached in order to avoid multiple calls when calculating multiple taxes for several line items associated to the same order.
- Even though the calculator is configured to import taxes for both line_items and shipments. I was only able to test it with line_items, since our testing environment is subsidizing all taxes associated to the shipments. However, the structure of the taxes seems to be the same for both line_items and shipments so I am positive that it should work. This is something to test properly. - Configured hook_order_upserted_v2 to run order.create_tax_charge!. This call is made upon each order creation/update.
- Added some more factories to the specs.
- Added a new support file (spec/support/flowcommerce_example_response.rb) to store any request example we might want to stub associated to flow.
Configuring price_range to return min/max only
Change the price_range
method in the Spree::FlowIoProductDecorator to always return min/max prices only
(previously had some convoluted logic of returning an { amount: rmin }
hash if min
was equal to max
).