首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iOS Venmo SDK发送付款问题:收件人无效(请输入有效的电话、邮箱、用户名或Venmo用户ID)

iOS Venmo SDK发送付款问题:收件人无效(请输入有效的电话、邮箱、用户名或Venmo用户ID)
EN

Stack Overflow用户
提问于 2014-08-01 04:28:13
回答 1查看 644关注 0票数 1

我集成了Venmo SDK,我在发送付款时遇到了一个问题。我已经正确地配置了所有内容。我点击Pay via Venmo按钮->应用程序重定向->批准->返回发送付款屏幕。当我点击发送付款,我得到一个错误“无效的收件人(请输入一个有效的电话,电子邮件,用户名,或Venmo用户ID)”

我已经检查了"sendPaymentTo“字段,它有正确的电话号码,正确的金额,甚至还有一个备注字段。

代码语言:javascript
复制
(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];
}
EN

回答 1

Stack Overflow用户

发布于 2014-09-23 00:02:30

这实际上是SDK错误消息中的一个错误。我认为真正的问题是您发送的是无效的金额(例如.01,amount字段实际上已经是以美分为单位的)。我在这里打开了一个问题:https://github.com/venmo/venmo-ios-sdk/issues/47

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25068307

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档