Exemplo n.º 1
0
 /**
  * 支付失败
  *
  * @param sn 支付编号
  */
 public void failure(String sn) {
   Payment payment = get(sn);
   payment.setPaymentStatus(Payment.PaymentStatus.failure);
   payment.setTradeNo(PaymentContext.getContext().getPayResult().getTradeNo());
   payment = this.paymentDao.save(payment);
   //        PaymentContext.getContext().payFailure(PaymentContext.getContext().getPayment());
 }
Exemplo n.º 2
0
 /**
  * 付款成功
  *
  * @param sn 支付编号
  */
 public void success(String sn, String tradeNo) {
   Payment payment = get(sn);
   payment.setPaymentStatus(Payment.PaymentStatus.success);
   payment.setTradeNo(tradeNo);
   this.paymentDao.save(payment);
   // TODO 订单事件触发方式
   //        PaymentContext.getContext().paySuccess(PaymentContext.getContext().getPayment());
 }
Exemplo n.º 3
0
 public void close(String sn, String tradeNo) {
   Payment payment = get(sn);
   payment.setPaymentStatus(Payment.PaymentStatus.invalid);
   payment.setTradeNo(tradeNo);
   this.paymentDao.save(payment);
 }