我已在authorize.net中为单个客户保存了多个付款资料。每个付款资料都包含信用卡信息。
我有两个问题 1)当我收取具有多个付款资料的客户的交易时,将收取哪张信用卡。 2)有没有办法定义默认信用卡收费。
由于
答案 0 :(得分:1)
目前无法为付款创建默认付款资料。必须始终通过每次createCustomerProfileTransactionRequest
调用传递一个。
答案 1 :(得分:0)
在updateCustomerPaymentProfileRequest页面中,我看到了以下内容:
defaultPaymentProfile:设置为true时,此字段将付款资料指定为默认付款资料。 如果指定了默认付款配置文件,则可以将getCustomerPaymentProfileRequest与customerProfileId一起用作唯一参数。
答案 2 :(得分:0)
设置默认付款资料将 100% 有效
import discord
from discord import Intents, channel, colour
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from discord import Embed
from discord.ext import commands
from discord.ext.commands import Bot as BotBase
from discord.ext.commands.core import check
from discord.ext.commands.errors import CommandNotFound
from discord.message import Message
from ygoprodeck import *
import random
from ..db import db
PREFIX = "+"
OWNER_IDS = [OWNER_ID]
ygo = YGOPro()
bot = commands.Bot(command_prefix='#')
class Bot(BotBase):
def __init__(self):
self.PREFIX = PREFIX
self.ready = False
self.guild = None
self.scheduler = AsyncIOScheduler()
db.autosave(self.scheduler)
super().__init__(
command_prefix=PREFIX,
owner_ids=OWNER_IDS,
intents=Intents.all(),
)
def run(self, version):
self.VERSION = version
with open("./lib/bot/token.0", "r", encoding="utf-8") as tf:
self.TOKEN = tf.read()
print("Running bot...")
super().run(self.TOKEN, reconnect=True)
async def on_connect(self):
print("Bot Connected")
async def on_disconnect(self):
print("Bot Disconnected")
async def on_error(self, err, *args, **kwargs):
if err == "on_command_error":
await args[0].send("Something went wrong.")
await self.stdout.send("An error occured.")
raise
async def on_command_error(self, ctx, exc):
if isinstance(exc, CommandNotFound):
pass
elif hasattr(exc, "original"):
raise exc.original
else:
raise exc
async def on_ready(self):
if not self.ready:
self.ready = True
self.guild = self.get_guild(GUILD_ID)
self.stdout = self.get_channel(854734087855013908)
self.scheduler.start()
await self.stdout.send("Now Online!")
global result_main
choices = ["yes", "no"]
run = True
while run:
channel = bot.get_channel(854734087855013908)
if channel == channel:
msg = await bot.wait_for("message", )
ygo_card = msg.content[1:]
message = ygo_card
value_random = random.choice(choices)
embed = Embed(title="Card Name:", description=message)
embed.add_field(name="Available: ", value=value_random, inline=False)
await channel.send(embed=embed)
print("Bot Ready")
else:
print("Bot Reconnected")
async def on_message(self, message):
pass
bot = Bot()