Explorar o código

支持二次退款

peng hai 1 ano
pai
achega
e36d16bb45
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/CloudStorage.py

+ 1 - 1
Controller/CloudStorage.py

@@ -2068,7 +2068,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': {