def return_text_failure_sender(**kwargs): text = ''' Hi{name_sender}, Your payment of {currency}{pay_out} to the account of {name_receiver} (Account number: {account_number}, Sort Code: {sort_code}{reference}) has just been declined. Please ensure you have entered the correct card information and/or try again with a different card. We hope it will work the next time. Thank you for using NicerPay. ''' reference = '' if kwargs.get('reference', '') != '': reference = ', Reference: ' + kwargs.get('reference') name_sender = '' if kwargs.get('name_sender', '') != '' and kwargs.get('name_sender', '') != '[card was declined, no name]': name_sender = ' ' + kwargs.get('name_sender') text = text.format(name_sender=name_sender, pay_out=two_digit_string(kwargs.get('pay_out', '[empty sum]')), name_receiver=kwargs.get('name_receiver', '[receiver name]'), account_number=kwargs.get('account_number', '[account number]'), sort_code=kwargs.get('sort_code', '[sort code]'), currency=currency.upper(), reference=reference) return text
def return_text_success_receiver(**kwargs): text = ''' Hi {name_receiver}, You have successfully been paid {currency}{pay_out}{by}, which will reach your account (Account number: {account_number}, Sort Code: {sort_code}{reference}) within approximately 7 days. Thank you for using NicerPay. ''' by = '' if kwargs.get('email_sender', '') != '': by = ' by ' + kwargs.get('email_sender') reference = '' if kwargs.get('reference', '') != '': reference = ', Reference: ' + kwargs.get('reference') text = text.format(name_receiver=kwargs.get('name_receiver', '[receiver name]'), pay_out=two_digit_string(kwargs.get('pay_out', '[empty sum]')), by=by, account_number=kwargs.get('account_number', '[account number]'), sort_code=kwargs.get('sort_code', '[sort code]'), currency=currency.upper(), reference=reference) return text
def return_text_success_sender(**kwargs): text = ''' Hi {name_sender}, Your card has been successfully charged {currency}{charged}, of which {currency}{pay_out} will reach the account of {name_receiver} (Account number: {account_number}, Sort Code: {sort_code}{reference}) within approximately 7 days. Thank you for using NicerPay. ''' reference = '' if kwargs.get('reference', '') != '': reference = ', Reference: ' + kwargs.get('reference') text = text.format(name_sender=kwargs.get('name_sender'), charged=two_digit_string(kwargs.get('charged', '[empty sum]')), pay_out=two_digit_string(kwargs.get('pay_out', '[empty sum]')), name_receiver=kwargs.get('name_receiver', '[receiver name]'), account_number=kwargs.get('account_number', '[account number]'), sort_code=kwargs.get('sort_code', '[sort code]'), currency=currency.upper(), reference=reference) return text