When I try to print it, it appears as an integer, but I get an error saying "The amount must be an integer." when I run the project
if str(Payments).__contains__("pay"):
paymentId = Payments.payment_id
amount = int(Payments.amount_paid)
refund_amount = int(amount) * 100
reamount = int(refund_amount)
print(reamount)
print(type(reamount))
client = razorpay.Client(auth=(settings.RAZOR_KEY_ID, settings.RAZOR_KEY_SECRET))
client.payment.refund(
paymentId,
{
"amount": reamount,
"speed": "optimum",
},
)
# addning stock in product
order_items = OrderProduct.objects.filter(order=order)
for item in order_items:
product = Product.objects.get(id=item.product_id)
product.stock += item.quantity
product.save()



