Tom Wilson
05/08/2023, 3:19 PMSpree::CreditCard
objects which I believe are created from the Spree::PaymentMethod::StripeCreditCard
class. Those objects do have a reference to the Stripe PaymentMethod in the gateway_payment_profile_id
field. (For us, those all happen to be card_XXX
because we are currently configured to pass v3_intents=false
in our payment method creation)Brandon White
05/08/2023, 11:15 PMtype' for nil:NilClass payment_method_types: [payment.source.stripe_payment_method.type]
Which I assume is because I wasn't able to enter payment info.
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:117:in `block in create_stripe_intent'
stripe (8.3.0) lib/stripe/stripe_client.rb:206:in `request'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/gateway.rb:194:in `request'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:109:in `create_stripe_intent'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:20:in `block in create_for_payment'
<internal:kernel>:90:in `tap'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:20:in `create_for_payment'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:10:in `prepare_for_payment'
solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/gateway.rb:111:in `purchase'
solidus_core (3.3.1) app/models/spree/payment_method.rb:41:in `purchase'
solidus_core (3.3.1) app/models/spree/payment/processing.rb:59:in `block in purchase!'
solidus_core (3.3.1) app/models/spree/payment/processing.rb:213:in `protect_from_connection_error'
solidus_core (3.3.1) app/models/spree/payment/processing.rb:58:in `purchase!'
solidus_core (3.3.1) app/models/spree/payment/processing.rb:29:in `process!'
solidus_core (3.3.1) app/models/spree/order/payments.rb:47:in `public_send'
solidus_core (3.3.1) app/models/spree/order/payments.rb:47:in `block in process_payments_with'
solidus_core (3.3.1) app/models/spree/order/payments.rb:44:in `each'
solidus_core (3.3.1) app/models/spree/order/payments.rb:44:in `process_payments_with'
solidus_core (3.3.1) app/models/spree/order/payments.rb:23:in `process_payments!'
solidus_core (3.3.1) app/models/spree/order.rb:743:in `process_payments_before_complete'
I'm having difficulty tracking down the problem since there is no console errors...Marie Lamoureux
05/09/2023, 7:54 AM[WARNING Spree] Missing migrations.
[WARNING Spree] - add_unique_index_to_option_values_variants
[WARNING Spree] - change_column_null_option_values_option_type_id
[WARNING Spree] - drop_deprecated_address_id_from_shipments
[WARNING Spree] - drop_unused_promo_action_line_items
[WARNING Spree] - remove_match_policy_from_spree_promotion
[WARNING Spree] - remove_taxon_position
[WARNING Spree] - remove_unused_columns_from_promotion_rules
[WARNING Spree]
[WARNING Spree] Run `bin/rails railties:install:migrations` to get them.
[WARNING Spree] You can silence this warning by setting the `SOLIDUS_SKIP_MIGRATIONS_CHECK` environment variable.
rails aborted!
LoadError: cannot load such file -- spree/testing_support
/Users/marielamoureux/code/lamoureuxmarie/infini-store/config/application.rb:13:in `block in <class:Application>'
/Users/marielamoureux/code/lamoureuxmarie/infini-store/config/environment.rb:5:in `<main>'
Tasks: TOP => db:load_config => environment
I get the same message after running ``bin/rails railtiesinstallmigrations`` or rails db:drop db:create db:migrate
Any idea about how to fix this?Alistair Norman
05/09/2023, 10:06 PMCould not find gem 'solidus (~> 4.0.0)' in rubygems repository <https://rubygems.org/> or installed locally.
when I try to upgrade. Does anyone know why it wouldn't be able to find it?Will
05/10/2023, 9:00 PMMarie Lamoureux
05/11/2023, 7:09 AMadd_remove_from_rejected.html.erb.deface
and add my code to it.
But if I take inspiration from solidus_subscription_gem
, for example, I can see something like that
Deface::Override.new(
virtual_path: "spree/admin/products/_form",
name: "solidus_subscriptions_product_subscribable_checkbox",
insert_after: "[data-hook='admin_product_form_promotionable']",
partial: "spree/admin/products/subscribable_checkbox"
)
I'm guessing it does the same thing but I'd like to understand.
2. How do I deploy my changes to production?
Both ways seems to work locally but I super confused about how to deploy changes I make in the backend to production. This is probably a stupid question but I cannot wrap my head around it š
If I create my overrides views in my main app, it's not working because it cannot find the override partial Missing partial app/overrides/views/products/_clothing_checkbox
. But any code I add in the backend is of course not tracked by me git repo.
Thank you for your help!Will
05/11/2023, 6:41 PMfill_in('spree_user_email', with: '<mailto:admin@example.com|admin@example.com>')
) has been able to enter text in the user/pass fields. Thanks in advanceTom Wilson
05/12/2023, 8:26 PMSteve Simitzis
05/13/2023, 2:00 AMSƩbastien Ternest
05/15/2023, 11:57 AMSƩbastien Ternest
05/15/2023, 12:01 PMSarah Naas
05/15/2023, 4:26 PM/subscriptions/api/v1/subscriptions/{id}/activate
route. I've noticed that the active route only exists in the admin namespace. What do you recommend for activating cancelled subscriptions?Wes Chang
05/16/2023, 8:28 PMorder_finalized
event is emitted however, it appears that our event handler is being ignored. Our current setup is a simple 1 line event handler that invokes an ActiveJob which then performs the POST request. We followed the Solidus docs on āSubscribing to Eventsā and took inspiration from the solidus_subscriptions gem. Our app is hosted on Google Cloud Run with CPU always allocated. In our GCP logs, we do see evidence of other event handlers being executed, such as SolidusSubscriptions::CreateSubscriptionJob
which is executed on order_finalized
, however, zero logs appear for ours. Initially, we thought that it might be the serverless environment that is preventing the event handler from executing but seeing SolidusSubscriptions::CreateSubscriptionJob
running and succeeding, I donāt believe this is the case. Any insight or suggestions would be greatly appreciated. Here are some snippets:
/config/initializers/omnes.rb
Rails.application.config.to_prepare do
TestStore::OrderFinalized.new.subscribe_to(Spree::Bus)
end
/app/subscribers/test_store/order_finalized.rb
module TestStore
class OrderFinalized
include Omnes::Subscriber
handle :order_finalized,
with: :notify_order_completed,
id: :solidus_prod_func_order_completed
def notify_order_completed(event, context)
TestStore::NotifyOrderCompletedJob.perform_later(event.payload[:order])
end
end
end
/app/jobs/test_store/notify_order_completed_job.rb
module TestStore
class NotifyOrderCompletedJob < ApplicationJob
queue_as :default
def perform(order)
handler = "API URL"
options = {
body: {
order: order.to_json
}
}
puts "Sending order to #{handler}"
<http://HTTParty.post|HTTParty.post>(handler, options)
end
end
end
jakemumu
05/18/2023, 9:01 PMSpree::Config.currency
on every request based on the cloudflare headers -- does this sound like a good solution or are we still handling this outside of the box?Eric Gross
05/21/2023, 1:51 AMEric Gross
05/21/2023, 2:24 AMEric Gross
05/21/2023, 3:59 PMOliver Vokoun
05/21/2023, 7:06 PMjakemumu
05/24/2023, 10:14 PMbase.remove_checkout_step :confirm
# our custom confirm step
base.insert_checkout_step :tax_confirmation, {
after: :payment, if: ->(order) {
order.tax_total != 0
}
}
-- however this totally breaks checkout and i just get an obtuse error: State cannot transition via next
-- any tips for debugging that?jakemumu
05/24/2023, 10:14 PMUlysses
05/25/2023, 2:35 PMEric Gross
05/26/2023, 9:53 PMSpree::User
with User
so that my install is more vanilla devise 𤷠and then i would use User
as the solidus user model, which i assume i can configurejakemumu
05/30/2023, 2:15 AMinitializer "solidus_paypal_commerce_platform.set_pricing_options_class" do
def (Spree::Config).pricing_options_class
binding.pry
SolidusPaypalCommercePlatform::PricingOptions
end
end
^ this method in the engine.rb file appears to run per request and take precedence to the store level pricing options rendering them unusable -- is there a way to avoid this by chance?jakemumu
05/30/2023, 2:28 AMJared Norman
Jared Norman
kennyadsl
jakemumu
05/30/2023, 6:04 PMconfig.after_initialize
block, but yeah it took me a while to figure out what was going onSƩbastien Ternest
05/31/2023, 9:56 AMShowing /Users/sebt-max/codeseb/edb091122/app/views/checkouts/payment/_stripe.erb where line #9 raised:
undefined local variable or method `payment' for #<ActionView::Base:0x00000000045448>
Extracted source (around line #9):
<dt><%= SolidusStripe::PaymentSource.human_attribute_name(:stripe_payment_intent_id) %>:</dt>
<dd><%= link_to(
payment.source.stripe_payment_intent_id,
payment.source.stripe_dashboard_url,
target: :_blank,
)%></dd>
Thank you very muchEric Gross
05/31/2023, 11:28 PMSpree::Order.create!(user: @contract.initiated_to_user)
product = Spree::Product.all.first
line_item = Spree::LineItem.create!(order: order, product: product, price: 100, quantity: 1)
order.next!
order.complete!
and it seems to be nondeterministic as to whether the line item's item_total_before_tax
has a value of 100
... is there a better way to create an order and add a line item, and then complete the order?
i have removed a few steps to simplify
base.remove_checkout_step :address
base.remove_checkout_step :delivery