Solidus: Unable to add 'Store Credit' as a payment method

Created on 18 Sep 2018  路  3Comments  路  Source: solidusio/solidus

Steps to reproduce

  • Check Available to users in admin > settings > payment methods > Store Credit > edit.
  • Create a user and add him a Store Credit with some cash.
  • Proceed to purchase a product with the user created.

Expected behavior

Finish the purchase paying with the Store Credit available to the user.

Actual behavior

In the checkout, after delivery step, I receive from the browser:

ActionView::MissingTemplate in Spree::Checkout#edit
Missing partial spree/checkout/payment/_storecredit with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}.

I've created a blank partial file _storecredit.hmtl.erb in app/views/spree/checkout/payment/.

After refreshing the payment page, the error is gone and can see the payment step of the checkout with Store Credit as an option for payment.

If I click Save and Continue button, then a flash error appears:

1 error prohibited this record from being saved:
There were problems with the following fields:

* Payments source can't be blank

System configuration

Solidus Version:

Solidus 2.6 and 2.7

Extensions in use:

New from scratch app, adding Solidus only with the seed and sample data.

Most helpful comment

@merlielmag @jacobherrington Store Credits are applied automatically if the user has some positive balance in their account. When you setup your payments, unchecked the option "available for users", in that way there is no code asking for the missing template. If you setup a payment with "available for users" it is because you are giving the user the option to select that payment. As I said before, store credits are applied automatically and it is visible during the checkout, so there is no need of template. Give it a go and let me know if it works.

All 3 comments

I can replicate this on Solidus 2.7.0

@merlielmag @jacobherrington Store Credits are applied automatically if the user has some positive balance in their account. When you setup your payments, unchecked the option "available for users", in that way there is no code asking for the missing template. If you setup a payment with "available for users" it is because you are giving the user the option to select that payment. As I said before, store credits are applied automatically and it is visible during the checkout, so there is no need of template. Give it a go and let me know if it works.

Hi @memotoro, you are right!
I was trying to let the user choose to pay between Store Credit or other payment method, but realized that the automatic behavior works perfect!
Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seand7565 picture seand7565  路  5Comments

cdrage picture cdrage  路  3Comments

kennyadsl picture kennyadsl  路  3Comments

tudorpavel picture tudorpavel  路  3Comments

spaghetticode picture spaghetticode  路  3Comments