import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from '../commons.service';
import {environment} from '../../../environments/environment';

@Injectable({
  providedIn: 'root'
})
export class OrderManageService {

  constructor(
      private http: HttpClient,
      private common: CommonsService
  ) {
  }

  /**
   * 交易订单退款
   *
   * @param  paramsObject   参数
   * @param  callBack   回调
   */
  public refundOrder(orderNo: string, remarks: string, callBack) {
    this.http.post(environment.orderUrl + 'refundOrder', { orderNo: orderNo, remarks: remarks}).subscribe(data => {
      callBack(data);
    });
  }

}
