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