def _cancel_process_for_international(**payload): """Process a cancel request by imp_uid""" iamport = Iamport(config.IAMPORT_API_KEY_FOR_INTERNATIONAL, config.IAMPORT_API_SECRET_FOR_INTERNATIONAL) try: result = iamport.cancel_by_imp_uid(**payload) return True, result, except Exception as exception: return _process_exception(exception)
def _cancel_process_for_domestic(**payload): """Process a cancel request by imp_uid""" iamport = Iamport(config.IAMPORT_API_KEY_FOR_DOMESTIC, config.IAMPORT_API_SECRET_FOR_DOMESTIC) try: result = iamport.cancel_by_imp_uid(**payload) return True, result, except Exception as exception: return _process_exception(exception)