gpt4 book ai didi

ios - SiriKit 付款确认货币始终为美元

转载 作者:可可西里 更新时间:2023-11-01 03:48:43 26 4
gpt4 key购买 nike

我构建了 Intents Extension,我正在处理 INSendMoneyIntent,我说:

Send 25€ to John Smith

应用确认后的响应

Here's your <Your_App> payment for US$25.00. Do you want to send it?

Intent 包含正确的货币 iso 3 代码 - 欧元,那么为什么 siri 在付款确认中显示错误的货币?

返回意图

INSendPaymentIntentResponse *reponse = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity];
completion(reponse);

最佳答案

您需要在您的响应中添加一个 paymentRecord

(void)confirmSendPayment:(INSendPaymentIntent *)intent

像这样:

INSendPaymentIntentResponse *response = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity];
response.paymentRecord = [[INPaymentRecord alloc] initWithPayee:intent.payee payer:nil currencyAmount:intent.currencyAmount paymentMethod:nil note:intent.note status:INPaymentStatusPending];
completion(response);

关于ios - SiriKit 付款确认货币始终为美元,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39122198/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com