def create_customer_profile(sender, instance=None, created=False, **kwargs):
    """ A post_save signal of RecurringPayment to create a customer profile
        on payment gateway.
    """
    if (instance.id and instance.platform == 'authorizenet' and not
        instance.customer_profile_id):
        instance.add_customer_profile()
