2 ways works !
This commit is contained in:
parent
7b8c0c82bc
commit
5eda07bd68
|
@ -28,7 +28,7 @@ def ProceedPaiement():
|
||||||
comment = str(commentEntry.get())
|
comment = str(commentEntry.get())
|
||||||
print("Paiement en cours ... " + recipient)
|
print("Paiement en cours ... " + recipient)
|
||||||
returnGen = sendGenDoc(recipient, amount, comment)
|
returnGen = sendGenDoc(recipient, amount, comment)
|
||||||
checkTXDoc(returnGen)
|
checkTXDoc(returnGen, recipient, amount, comment)
|
||||||
returnSigned = signDoc(returnGen)
|
returnSigned = signDoc(returnGen)
|
||||||
sendTXDoc(returnSigned)
|
sendTXDoc(returnSigned)
|
||||||
|
|
||||||
|
|
9
pay.py
9
pay.py
|
@ -62,7 +62,7 @@ def sendGenDoc(recipient, amount, comment):
|
||||||
|
|
||||||
|
|
||||||
# Check document
|
# Check document
|
||||||
def checkTXDoc(txDoc):
|
def checkTXDoc(txDoc, recipient, amount, comment):
|
||||||
docList = txDoc.splitlines()
|
docList = txDoc.splitlines()
|
||||||
for i, line in enumerate(docList):
|
for i, line in enumerate(docList):
|
||||||
if re.search("Issuers:", line):
|
if re.search("Issuers:", line):
|
||||||
|
@ -121,9 +121,10 @@ def sendTXDoc(signedDoc):
|
||||||
# Execute workflow
|
# Execute workflow
|
||||||
if not graphic:
|
if not graphic:
|
||||||
returnGen = sendGenDoc(recipient, amount, comment)
|
returnGen = sendGenDoc(recipient, amount, comment)
|
||||||
docIsOK = checkTXDoc(returnGen)
|
docIsOK = checkTXDoc(returnGen, recipient, amount, comment)
|
||||||
returnSigned = signDoc(returnGen)
|
if docIsOK:
|
||||||
sendTXDoc(returnSigned)
|
returnSigned = signDoc(returnGen)
|
||||||
|
sendTXDoc(returnSigned)
|
||||||
|
|
||||||
#print(sentTX) #For debug
|
#print(sentTX) #For debug
|
||||||
|
|
||||||
|
|
Reference in New Issue