This commit is contained in:
yumoqing 2025-12-16 21:14:47 +08:00
parent 4bda7bc81a
commit b2f61e6e3b

View File

@ -11,13 +11,13 @@ from ..core import Gateway
def guess_charset(msg):
charset = msg.get_charset()
if charset is None:
content_type = msg.get('Content-Type', '').lower()
pos = content_type.find('charset=')
if pos >= 0:
charset = content_type[pos + 8:].strip()
return charset
charset = msg.get_charset()
if charset is None:
content_type = msg.get('Content-Type', '').lower()
pos = content_type.find('charset=')
if pos >= 0:
charset = content_type[pos + 8:].strip()
return charset
class EmailClient:
def __init__(self, pop3_server, emailaddress, password):
@ -70,15 +70,15 @@ class TransferPay(Gateway):
self.running = False
async def create_payment(self, payload: Dict[str, Any]) -> str:
"""
返回一个可以在 H5 里直接重定向的支付宝支付 URL
"""
ns = {
"id": payload["out_trade_no"],
"""
返回一个可以在 H5 里直接重定向的支付宝支付 URL
"""
ns = {
"id": payload["out_trade_no"],
"customerid": payload['customerid'],
"amount": payload["amount"],
"tcode": self.gen_mailcode(),
"curdate": curDateString(),
"amount": payload["amount"],
"tcode": self.gen_mailcode(),
"curdate": curDateString(),
"curtime": timestampstr(),
"status": '0'
}