public virtual SyncPaymentMethodsResponse SyncPaymentMethods(SyncPaymentMethodsRequest request) { var response = new SyncPaymentMethodsResponse(); try { // Raise Initialization Event var initialization = SyncPaymentMethodsInitialization; if (initialization != null) { initialization(request, response); } // Raise Execute Event var execute = SyncPaymentMethodsExecute; if (execute != null) { response = execute(request); } // Raise Complete Event var complete = SyncPaymentMethodsComplete; if (complete != null) { complete(request, response); } } catch (Exception exception) { // Raise Error Event var error = SyncPaymentMethodsError; if (error != null) { error(request, response, exception); } } return(response); }
public override SyncPaymentMethodsResponse OnSyncPaymentMethodsExecute(SyncPaymentMethodsRequest request) { var syncItemsFactory = new SyncItemsFactory(); var response = new SyncPaymentMethodsResponse(); try { response.SyncPaymentMethods = syncItemsFactory.SyncPaymentMethods(); } catch (Exception ex) { response.Exception = ex; response.Message = ex.Message; } return(response); }