浏览代码

支持二次退款

peng 1 年之前
父节点
当前提交
8e6719ce47
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/CloudStorage.py

+ 1 - 1
Controller/CloudStorage.py

@@ -2483,7 +2483,7 @@ class CloudStorageView(View):
                     sale_id = sale['id']
                 sale_id = sale_id if sale_id else trade_no
                 paypal_sale = paypalrestsdk.Sale.find(sale_id)
-                if not paypal_sale or paypal_sale['state'] != 'completed':
+                if not paypal_sale or paypal_sale['state'] not in ['completed', 'partially_refunded']:
                     return response.json(805)
                 refund = paypal_sale.refund({
                     'amount': {