def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) amount = ShareLib.determine_amount_from_all_option_or_std_in(all_option) description = ShareLib.determine_description_from_all_option_or_std_in( all_option) recipient = ShareLib.determine_recipient_from_all_option_or_std_in( all_option) print(f''' | Sending: € {amount} | To: {recipient} | Description: {description} ... ''') bunq.make_payment(amount, description, recipient) print(''' | ✅ Payment sent | ▶ Check your changed overview ''') bunq.update_context()
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) for i in range(1): amount, description, geolocation = generate_random_entry() print(amount, description, geolocation) recipient = "*****@*****.**" bunq.make_payment(str(amount), description, recipient, geolocation=geolocation) time.sleep(1)
def make_payment_w_discount(amount, description, recipient, discounts): """ Wrapper around bunq `make_payment` function. Calculates the discount specific to a user. """ all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) shop, user_discount = determine_discount(description, discounts) * amount # Request data from sugar daddy (advance payment) bunq.make_request(user_discount, "-".join("ADVANCE", shop, user_discount), "*****@*****.**") # Make actual payment to the shop bunq.make_payment(amount - user_discount, description, recipient)