mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
Fix selector and condition patterns (#85)
This commit is contained in:
parent
5824c62847
commit
ae2ec46239
@ -22,7 +22,7 @@ test({currency_is, V1}, #{currency := V2}, _) ->
|
||||
V1 =:= V2;
|
||||
test({cost_in, V}, #{cost := C}, _) ->
|
||||
test_cash_range(C, V) =:= within;
|
||||
test({payment_tool_condition, C}, #{payment_tool := V}, Rev) ->
|
||||
test({payment_tool, C}, #{payment_tool := V}, Rev) ->
|
||||
hg_payment_tool:test_condition(C, V, Rev);
|
||||
test({shop_location_is, V}, #{shop := S}, _) ->
|
||||
V =:= S#domain_Shop.details#domain_ShopDetails.location;
|
||||
|
@ -30,6 +30,6 @@ test_condition(_PaymentTool, _Condition, _Rev) ->
|
||||
|
||||
test_bank_card_condition({payment_system_is, Ps}, #domain_BankCard{payment_system = Ps0}, _Rev) ->
|
||||
Ps =:= Ps0;
|
||||
test_bank_card_condition({bank_card_bin_in, RangeRef}, #domain_BankCard{bin = BIN}, Rev) ->
|
||||
test_bank_card_condition({bin_in, RangeRef}, #domain_BankCard{bin = BIN}, Rev) ->
|
||||
#domain_BankCardBINRange{bins = BINs} = hg_domain:get(Rev, {bank_card_bin_range, RangeRef}),
|
||||
ordsets:is_element(BIN, BINs).
|
||||
|
Loading…
Reference in New Issue
Block a user