SiriKit付款确认货币始终为美元 [英] SiriKit payment confirmation currency is always US$
问题描述
我构建Intents扩展,我正在处理INSendMoneyIntent,我说:
向John Smith发送25€
应用程序确认后的响应
这是你的< Your_App>付款25美元。你想发送吗?
Intent包含正确的货币iso 3代码 - EUR,那么为什么siri在付款确认中显示错误的货币?
返回意图
INSendPaymentIntentResponse * reponse = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity];
完成(响应);
您需要在<的回复中添加paymentRecord / p>
(无效)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];
完成(回复);
I build Intents Extension and I'm handling INSendMoneyIntent and I'm saying:
Send 25€ to John Smith
response after app confrimation
Here's your <Your_App> payment for US$25.00. Do you want to send it?
Intent contains proper currency iso 3 code - EUR, so why siri displays wrong currency in payment confirmation?
returning intent
INSendPaymentIntentResponse *reponse = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity];
completion(reponse);
You need to add a paymentRecord to your response in
(void)confirmSendPayment:(INSendPaymentIntent *)intent
like so:
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);
这篇关于SiriKit付款确认货币始终为美元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!