我集成了 Venmo SDK,但在发送付款时遇到了问题。我已经正确配置了一切。我点击通过 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];
}