我集成了Venmo SDK,我在发送付款时遇到了一个问题。我已经正确地配置了所有内容。我点击Pay via Venmo按钮->应用程序重定向->批准->返回发送付款屏幕。当我点击发送付款,我得到一个错误“无效的收件人(请输入一个有效的电话,电子邮件,用户名,或Venmo用户ID)”
我已经检查了"sendPaymentTo“字段,它有正确的电话号码,正确的金额,甚至还有一个备注字段。
(IBAction)sendAction:(id)sender {
void(^handler)(VENTransaction *, BOOL, NSError *) = ^(VENTransaction *transaction, BOOL success, NSError *error) {
if (error) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:error.localizedDescription
message:error.localizedRecoverySuggestion
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"OK", nil];
alertView.tapBlock = ^(UIAlertView *alertView, NSInteger buttonIndex) {
[alertView dismissWithClickedButtonIndex:buttonIndex animated:YES];
};
[alertView show];
}
else {
if ([self.delegate respondsToSelector:@selector(paymentSuccesfull:)]) {
[self.delegate paymentSuccesfull:transaction.transactionID];
}
[[Venmo sharedInstance] logout];
}
};
[[Venmo sharedInstance] sendPaymentTo:self.phoneNumber
amount:self.amountTextField.text.floatValue*100
note:self.noteTextField.text
completionHandler:handler];
}发布于 2014-09-23 00:02:30
这实际上是SDK错误消息中的一个错误。我认为真正的问题是您发送的是无效的金额(例如.01,amount字段实际上已经是以美分为单位的)。我在这里打开了一个问题:https://github.com/venmo/venmo-ios-sdk/issues/47
https://stackoverflow.com/questions/25068307
复制相似问题