@bot.command()
async def pay(ctx, order_id=None):
if int(ctx.channel.id) not in channels_id:
# try:
order = get_order_id(order_id)
if order_id.isdigit():
ended("orders", "step", 13, int(order_id), int(order['customer_id']))
await ctx.send(f"Заказ №{order_id} оплачен.")
customer = get_customer(int(order['customer_id']))
pay_token = customer['wallet_token']
# print(customer['wallet_token'], 'токееееен')
for executor in eval(order['executors_id']):
print(executor, 'executorrrrrrrrrrr')
cnt = get_executor(int(executor))
exe = int(executor)
member = bot.get_user(261001172674936833)
update('executors', 'cnt_orders', cnt['cnt_orders']+1, int(executor))
await member.send(f"Заказ №{order_id} оплачен.")
data_executor = get_executor(int(executor))
wallet = data_executor['wallet_address']
customer = get_customer(int(order['customer_id']))
print(wallet)
qiwi.send_p2p(wallet, str(order_id), int(order['price']), pay_token)
await asyncio.sleep(65)
qiwi.send_p2p('+7xxxxxxxxxx', str(o_id), (int(order['comission']) - int(order['price'])), pay_token)
room = bot.get_channel(order['room'])
await room.delete()
@bot.command()
async def pay(ctx, order_id=None):
if int(ctx.channel.id) not in channels_id:
# try:
order = get_order_id(order_id)
if order_id.isdigit():
ended("orders", "step", 13, int(order_id), int(order['customer_id']))
await ctx.send(f"Заказ №{order_id} оплачен.")
customer = get_customer(int(order['customer_id']))
pay_token = customer['wallet_token']
# print(customer['wallet_token'], 'токееееен')
for executor in eval(order['executors_id']):
print(executor, 'executorrrrrrrrrrr')
cnt = get_executor(int(executor))
exe = int(executor)
member = bot.get_user(261001172674936833)
update('executors', 'cnt_orders', cnt['cnt_orders']+1, int(executor))
await member.send(f"Заказ №{order_id} оплачен.")
data_executor = get_executor(int(executor))
wallet = data_executor['wallet_address']
customer = get_customer(int(order['customer_id']))
print(wallet)
qiwi.send_p2p(wallet, str(order_id), int(order['price']), pay_token)
await asyncio.sleep(65)
qiwi.send_p2p('+7xxxxxxxxx', str(o_id), (int(order['comission']) - int(order['price'])), pay_token)
room = bot.get_channel(order['room'])
await room.delete()