import * as api from '../services/order';

export default {
  namespace: 'order',
  state: {},
  effects: {
    *cardPay(action, {call}) {
      let {data} = yield call(api.cardPay, action);
      return data;
    },
    *status(action, {call}) {
      try {
        let {data} = yield call(api.status, action);
        return data;
      } catch (e) {
        return {code: 1, data: 0};
      }
    },
  },
};
