def contact_info_listener(name, email, phone, payment_item_slug, user=None): if (user is not None) and user.is_authenticated: user_id = user.id if 'pytools' in payment_item_slug: core_facade.client_checkout_form(user, 'unknown') elif 'membership' in payment_item_slug: core_facade.member_checkout_form(user) else: user_id = None email_marketing_facade.create_or_update_with_no_role.delay( name, email, f'{payment_item_slug}-form', id=user_id, phone=str(phone) )
def contact_info_listener(name: str, email: str, phone: str, payment_item_slug: str, user=None): if (user is not None) and user.is_authenticated: user_id = user.id if payment_item_slug.startswith('membership'): core_facade.member_checkout_form(user) elif payment_item_slug.startswith('webdev'): core_facade.webdev_checkout_form(user) else: user_id = None email_marketing_facade.create_or_update_with_no_role.delay( name, email, f'{payment_item_slug}-form', id=user_id, phone=str(phone))