diff --git a/lib/registration.rb b/lib/registration.rb index a41002d2ed3b038d27455fec017e0364c47bab04..0be697dd5b8210910d24a803220958feb845917c 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -448,16 +448,18 @@ class Registration def write BandwidthTNOrder.create( @tel, - customer_order_id: @customer.customer_id + customer_order_id: @customer.customer_id, + reservation_id: rid ).then(&:poll).then( ->(_) { customer_active_tel_purchased }, - ->(_) { number_purchase_error } + method(:number_purchase_error) ) end protected - def number_purchase_error + def number_purchase_error(e) + Command.log.error "number_purchase_error", e TEL_SELECTIONS.delete(@customer.jid).then { TelSelections::ChooseTel.new.choose_tel( error: "The JMP number #{@tel} is no longer available." diff --git a/test/test_helper.rb b/test/test_helper.rb index 7ef919a06c916297537feea2905e46939451e651..d6fdaceb8e8bc9d7593a6609fe450fd01524b5e0 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -127,6 +127,8 @@ LOG = Class.new { end def info(*); end + + def error(*); end }.new.freeze def log