Skip to content

Commit

Permalink
Added dumping more details to SQS for better inquiry
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghav Bhasin authored and Raghav Bhasin committed Aug 20, 2018
1 parent 666ecc4 commit fc3298c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ACH Processor/ACH Proccessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def lambda_handler(event, context):
print(err)
elif status == 'failed':
#Dump to SQS for furthe inquiry in matter
data = json.loads(item['payee'])
queue.send_message(MessageBody=json.dumps(item))
message = 'Transaction ' + item['id'] + ' for $' + item['amount'] + ' could not be cleared'
message = 'Transaction ' + item['id'] + ' for $' + item['amount'] + 'to ' + data['name'] + ' for \"' + data['description'] + '\"'+ ' could not be cleared'
try:
twillio_client.messages.create(to=item['phone'], from_= os.environ.get('twillio_phone'), body= message)
except Exception as err:
Expand Down

0 comments on commit fc3298c

Please sign in to comment.