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

我构建Intents扩展,我正在处理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代码 – EUR,那么为什么siri在付款确认中显示错误的货币?

回归意图

INSendPaymentIntentResponse *reponse = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity];
completion(reponse);
最佳答案
您需要在回复中添加paymentRecord

(void)confirmSendPayment 🙁 INSendPaymentIntent *)意图

像这样:

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付款确认货币始终为美元 - 代码日志