Exemple #1
0
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)
Exemple #2
0
 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)
Exemple #3
0
 def process_response(self, res):
     PayID.delete(self._user, self.customerPaymentProfileId)
     return True
Exemple #4
0
 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)
Exemple #5
0
 def process_response(self, res):
     PayID.delete(self._user, self.customerPaymentProfileId)
     return True
Exemple #6
0
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)