Esempio n. 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)
Esempio n. 2
0
File: api.py Progetto: eerock/reddit
 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)
Esempio n. 3
0
File: api.py Progetto: eerock/reddit
 def process_response(self, res):
     PayID.delete(self._user, self.customerPaymentProfileId)
     return True
Esempio n. 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)
Esempio n. 5
0
 def process_response(self, res):
     PayID.delete(self._user, self.customerPaymentProfileId)
     return True
Esempio n. 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)