import { CREATE_PAYMENT, FETCH_PAYMENT } from '../constants/payment';

export function fetchPayment(paymentId) {
  return {
    type: FETCH_PAYMENT,
    api: true,
    auth: true,
    payload: {
      method: 'GET',
      url: `/transactions/payments/${paymentId}`
    }
  };
}

export function createPayment(order) {
  return {
    type: CREATE_PAYMENT,
    api: true,
    auth: true,
    payload: {
      method: 'POST',
      url: '/transactions/payments',
      data: { order }
    }
  };
}
