Jelajahi Sumber

vsees云存

peng 10 bulan lalu
induk
melakukan
f601a50008
2 mengubah file dengan 8 tambahan dan 3 penghapusan
  1. 5 0
      Ansjer/cn_config/config_test.py
  2. 3 3
      Controller/PaymentCycle.py

+ 5 - 0
Ansjer/cn_config/config_test.py

@@ -57,9 +57,14 @@ PAYPAL_CRD = {
               "client_secret": "EAjEU9b7bwrtk1uDgB-0e3gQ2Sa2jOKR1n2xLL38zFK3HYkARwx-F02_-5fXeakh_3aBr_QGySuiPYNh"}
 }
 
+# zosi web_hook_id
 PAYPAL_WEB_HOOK_ID = '6TS30758D98835230'
 PAYPAL_WEB_HOOK_ID_TWO = '2BH56575UJ9324151'
 
+#
+VSEES_PAYPAL_WEB_HOOK_ID = '9TG90006CD6031031'
+VSEES_PAYPAL_WEB_HOOK_ID_TWO = '4UK33415UG369440K'
+
 # 数据库dyanamo品牌日志数据库
 USER_BRAND = 'test_user_brand'
 USER_BRAND_ALL = 'test_user_brand_all'

+ 3 - 3
Controller/PaymentCycle.py

@@ -11,7 +11,7 @@ from django.http import HttpResponseRedirect, HttpResponse
 from django.views.generic.base import View
 
 from Ansjer.config import PAYPAL_CRD, SERVER_DOMAIN_SSL, PAYPAL_WEB_HOOK_ID, PAYPAL_WEB_HOOK_ID_TWO, CONFIG_INFO, \
-    CONFIG_US, CONFIG_EUR
+    CONFIG_US, CONFIG_EUR, VSEES_PAYPAL_WEB_HOOK_ID, VSEES_PAYPAL_WEB_HOOK_ID_TWO
 from Controller import CloudStorage
 from Model.models import PayCycleConfigModel, Store_Meal, UID_Bucket, PromotionRuleModel, \
     Unused_Uid_Meal, Device_Info, CouponModel, Order_Model, PaypalWebHookEvent, CountryModel, AiService
@@ -413,7 +413,7 @@ class PaypalCycleNotify(View):
                 if not response:
                     paypalrestsdk.configure(PAYPAL_CRD['Vsees'])
                     response = paypalrestsdk.WebhookEvent.verify(
-                        transmission_id, transmission_time, PAYPAL_WEB_HOOK_ID, json_agreement_str, cert_url,
+                        transmission_id, transmission_time, VSEES_PAYPAL_WEB_HOOK_ID, json_agreement_str, cert_url,
                         transmission_sig, auth_algo)
                     if not response:
                         PAY_LOGGER.info('PayPal周期扣款失败---签名验证失败')
@@ -726,7 +726,7 @@ class PaypalCycleNotify(View):
             if not response:
                 paypalrestsdk.configure(PAYPAL_CRD['Vsees'])
                 response = paypalrestsdk.WebhookEvent.verify(
-                    transmission_id, transmission_time, PAYPAL_WEB_HOOK_ID_TWO, json_agreement_str, cert_url,
+                    transmission_id, transmission_time, VSEES_PAYPAL_WEB_HOOK_ID_TWO, json_agreement_str, cert_url,
                     transmission_sig, auth_algo)
                 logger.info('----验证签名----')
                 logger.info(response)