anchor.diff:      ,get_order/1
       ,complete_order/2
       ,make_stripe_payment/5
  +    ,make_stripe_payment/1
       ,save_stripe_payment/5
   ]).
   
  
positive.code:     end,
      orders_queue:update_orders().
  
  make_stripe_payment(Oid) ->
      try
          [{Order}] = get_order(Oid),
  
negative.code:         _:R                  -> {error, R}
      end.
  
  update_order_for_cancel(Oid) ->
  	case emysql:execute(mysqlpool,
              <<"select o.cost, abs(timestampdiff(hour, now(), order_ontime)) ",
              " from orders o where o.id = ?">>, [Oid]) of
  		{result_packet,_,_,[[Amnt, Hrs]],_} when Hrs < 24 -> 
              lager:debug("UOFC < 24 ~p", [Amnt]),
              ok;
  		{result_packet,_,_,[[Amnt, Hrs]],_} when Hrs < 48 -> 
              NAmnt = Amnt div 5,
              Ur = emysql:execute(mysqlpool, <<"update orders set cost=? where id=?">>, [NAmnt, Oid]),
              lager:debug("UOFC < 48 ~p", [{Amnt, NAmnt, Ur}]),
              ok;
  		{result_packet,_,_,[[Amnt, Hrs]],_} when Hrs > 48 ->
              lager:debug("UOFC > 48 ~p", [Amnt]),
              nok
          ;_ -> nok
  	end.
  
  update_order_stripe_token(Orderid, Pid1) ->
      emysql:execute(mysqlpool,<<"update orders set payment_status = 0, payment_id=? where id=?">>,[Pid1, Orderid]).
  
  