40 lines
769 B
Python
Executable File
40 lines
769 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from tkinter import Tk, Label, Entry, Button
|
|
from libs.paylib import Transaction
|
|
|
|
|
|
window = Tk()
|
|
|
|
title = Label(window, text="Paiement Ḡ1")
|
|
title.pack()
|
|
|
|
# Recipient input
|
|
recipientEntry = Entry()
|
|
recipientEntry.pack()
|
|
|
|
|
|
# Amount input
|
|
AmountEntry = Entry()
|
|
AmountEntry.pack()
|
|
|
|
# Comment input
|
|
commentEntry = Entry()
|
|
commentEntry.pack()
|
|
|
|
def ProceedPaiement():
|
|
recipient = str(recipientEntry.get())
|
|
amount = int(AmountEntry.get())
|
|
comment = str(commentEntry.get())
|
|
print("Paiement en cours ... " + recipient)
|
|
|
|
trans = Transaction(recipient, amount, comment)
|
|
trans.send()
|
|
|
|
recipient = amount = comment = None
|
|
|
|
sendButton = Button(window, text="Envoyer", command=ProceedPaiement)
|
|
sendButton.pack()
|
|
|
|
window.mainloop()
|