def delete_payment_method(user, payment_method_id): profile_id = CustomerID.get_id(user._id) success = api.delete_payment_profile(profile_id, payment_method_id) if success: PayID.delete(user, payment_method_id)
def process_error(self, res): if self.is_error_code(res, Errors.RECORD_NOT_FOUND): PayID.delete(self._user, self.customerPaymentProfileId) return GetCustomerPaymentProfileRequest.process_error(self, res)
def process_response(self, res): PayID.delete(self._user, self.customerPaymentProfileId) return True