2016-08-24 3 views
5

나는 텐트 확장 및 내가 INSendMoneyIntent을 처리하고있어 말인지 구축 :

응답 응용 프로그램 confrimation

후 존 스미스 25 € 보내기

귀하의 < Your_App> 결제 금액은 US $ 25.00입니다. 보내시겠습니까?

의도에는 적절한 통화 iso 3 코드 - EUR가 포함되어 있습니다. 따라서 siri가 지불 확인에 잘못된 통화를 표시하는 이유는 무엇입니까? 반환

의도

당신은

(무효) confirmSendPayment에 응답에 paymentRecord를 추가 할 필요가

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

PLZ, 몇 가지 코드를 보여를? – Shoaib

+0

추가되었지만 심각하게, 이것이 코드 오류라고하는 방법은 없습니다. 구성 문제일까요? – user3292998

+0

iOS 10이 아직 베타 버전 인 상태에서 [Apple에 버그로보고하는 것이 좋습니다] (https://bugreport.apple.com/)가 좋습니다. 그리고 베타 포럼에 게시 할 수도 있습니다. –

답변

5

:과 같이 의도 (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); 
1

Julius의 답변에 동의하지만 curre 설정 위치가 표시되지 않습니다. 좋았어. 당신은 방법

- (INPaymentRecord *) getPaymentRecord:(INSendPaymentIntent *)intent 
{ 
    INCurrencyAmount *currAmount = [[INCurrencyAmount alloc] initWithAmount: intent.currencyAmount currencyCode:@"ZAR"]; 
    INPaymentMethod *paymentMethod = [[INPaymentMethod alloc] initWithType:INPaymentMethodTypeCredit name:@"" identificationHint:@"" icon:nil]; 
    INPaymentRecord *paymentRecord = [[INPaymentRecord alloc] initWithPayee:nil payer:nil currencyAmount: intent.currencyAmount paymentMethod:paymentMethod note:nil status:INPaymentStatusCompleted ]; 
return paymentRecord; 

}

를 만들 수 있습니다 그리고 대리인이 방법에서 당신은 당신의 위의 두 문장 사이의 paymentrecord 할당 슬롯 :

INSendPaymentIntentResponse *response = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeSuccess userActivity:nil]; 

    **response.paymentRecord = [self getPaymentRecord:intent];** 

    completion(response); 
+0

일 것입니다. 당신이 틀렸을 때, 의도 인스턴스가'confirmSendPayment'에서 전달되었으므로 기본적으로 통화 설정이 필요합니다. 'confirmSendPayment'에 – user3292998