mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Doc defensive coding needed by pin payments
[skip ci]
This commit is contained in:
@@ -33,6 +33,11 @@ module Checkout
|
||||
@params[:order][:payments_attributes].first[:source_attributes] = payment_source_params
|
||||
end
|
||||
|
||||
# Ensures cc_type is always passed to the model by inferring the type when
|
||||
# the frontend didn't provide it. This fixes Pin Payments specifically
|
||||
# although it might be useful for future payment gateways.
|
||||
#
|
||||
# More details: app/assets/javascripts/darkswarm/services/checkout.js.coffee#L70-L98
|
||||
def fill_in_card_type
|
||||
return unless payment_source_attributes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user