本文整理汇总了Python中models.order.Order.orderCombatLevel方法的典型用法代码示例。如果您正苦于以下问题:Python Order.orderCombatLevel方法的具体用法?Python Order.orderCombatLevel怎么用?Python Order.orderCombatLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.order.Order
的用法示例。
在下文中一共展示了Order.orderCombatLevel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ProcessOrder
# 需要导入模块: from models.order import Order [as 别名]
# 或者: from models.order.Order import orderCombatLevel [as 别名]
def ProcessOrder(self, pArgumentDic):
tOrderHandler = OrderHandler()
tCustomerHandler = CustomerHandler()
tCustomer = Customer()
tPaypalOrder = PaypalOrder()
tArgumentDic = pArgumentDic
# Assign Values from POST from Paypal IPN
tTransactionId = tArgumentDic["txn_id"]
tAlphaMatch = re.compile("[^A-Za-z0-9]+")
tAlphaSpaceMatch = re.compile("[^A-Za-z0-9 ]+")
# Short circuits the order process for special PA page
if "payer_email" in tArgumentDic.keys():
if tArgumentDic["payer_email"] == "[email protected]":
tPaypalOrder.ProcessPlayerAuctions(tArgumentDic)
return
try:
tGoldAmount = tArgumentDic["option_name7"]
except:
tGoldAmount = ""
try:
tCustomerFirstName = tAlphaSpaceMatch.sub("", tArgumentDic["first_name"])
except:
tCustomerFirstName = ""
try:
tCustomerLastName = tAlphaSpaceMatch.sub("", tArgumentDic["last_name"])
except:
tCustomerLastName = ""
try:
tCustomerName = tAlphaSpaceMatch.sub("", tArgumentDic["option_name1"])
except:
tCustomerName = ""
try:
tEmail = tArgumentDic["option_name2"]
except:
tEmail = ""
tPaypalEmail = str(tArgumentDic["payer_email"]).lower()
try:
tMobilePhone = tArgumentDic["option_name3"]
tMobilePhone = re.sub(r"\D", "", tMobilePhone)
except:
tMobilePhone = ""
try:
tRsName = tArgumentDic["option_name4"].strip().lower()
tRsName = tRsName.replace(" ", "_")
tRsName = tRsName.replace("-", "_")
except:
tRsName = ""
try:
tCombatLevel = ""
except:
tCombatLevel = ""
# try:
# tReferCode = str(tArgumentDic['option_name5']).strip()
# except:
tReferCode = ""
try:
tPromotionCode = str(tArgumentDic["option_name5"]).strip()
except:
tPromotionCode = ""
tOrderIp = tArgumentDic["custom"]
tMembers = ""
try:
tOrderQuery = Order.all().filter("orderTransactionId", tTransactionId)
tOrder = tOrderQuery.fetch(1)[0]
except:
tOrder = Order()
if "fake" in tArgumentDic.keys():
# logging.debug('Fake key hit')
# logging.debug(str(tArgumentDic['fake']))
if tArgumentDic["fake"] == "True":
tOrder.orderIsGenerated = True
tOrder.orderFormName = tCustomerName
tOrder.orderCombatLevel = tCombatLevel
if len(tGoldAmount) == 0:
tUrl = "https://api-3t.paypal.com/nvp"
# tOperation = "AddressVerify"
tOperation = "GetTransactionDetails"
# Get Paypal Information
# tPaypal = PaypalTrigger()
tResultDictionary = {}
tPaypalPayload = {}
tPayload = {}
tPaypalPayload["METHOD"] = tOperation
tPaypalPayload["TRANSACTIONID"] = tTransactionId
tPayloadEncoded = tOrderHandler.GeneratePayload(tPaypalPayload)
#.........这里部分代码省略.........