Browse Source

支持二次退款

peng 1 năm trước cách đây
mục cha
commit
8e6719ce47
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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': {