Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Venmo One Touch button iOS SDK #103

Closed
SolomonBier opened this issue Feb 27, 2015 · 14 comments
Closed

Venmo One Touch button iOS SDK #103

SolomonBier opened this issue Feb 27, 2015 · 14 comments
Labels

Comments

@SolomonBier
Copy link

Clicking on the Venmo button returns the following error:

BTPaymentButton collection view received didSelectItemAtIndexPath for unknown indexPath. This should never happen.

OneTouch is enabled. **EDIT: PayPal looks like it does not work now. It hooks to the PayPal app and then returns to the original app without updating anything.

@SolomonBier SolomonBier changed the title Venmo button iOS Sdk Venmo One Touch button iOS SDK Feb 27, 2015
@burnto
Copy link
Contributor

burnto commented Feb 27, 2015

Thanks @SolomonBier - we'll look into this.

@burnto
Copy link
Contributor

burnto commented Feb 27, 2015

@SolomonBier I believe the log statement you are seeing is probably due to a missing break statement here:

[self.paymentProvider createPaymentMethod:BTPaymentProviderTypeVenmo];

We need to add that break, obviously.

I would appreciate it if you could confirm my explanation by setting a breakpoint in your own project and stepping through that particular switch and ensuring that you are actually getting into the Venmo case, then falling through to the default case.

But if you're noticing this logging, it sounds like the app switch to Venmo is not actually working for you, which is why you reported this issue. Correct? If so, we should dig into this further.

@SolomonBier
Copy link
Author

@burnto I saw that too. Adding the break statement yield returns a UIAlertView that says "PayPal Error". Again the PayPal button hooks to the PayPal app, then immediately returns, but doesn't update the payment method.

I believe that hits this method:

  • (void)informDelegateDidFailWithError:(NSError *)error

Which then returns the below

  • (NSString *)ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE {
    return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE", [self localizationTable], [self localizationBundle], @"PayPal Error", @"Title for alert view that is displayed when Drop In submission fails because there was an error saving the PayPal account");
    }

@SolomonBier
Copy link
Author

@burnto any updates on this ?

@mickeyreiss
Copy link
Contributor

We've released a fix for the missing break in 3.7.1.

@SolomonBier
Copy link
Author

@mickeyreiss I just updated to 3.8 I believe and this still isn't working, and neither is Paypal.

@intelliot
Copy link
Contributor

Is your integration currently using sandbox, or production?

We'll look into this soon. Thanks for your patience.

@intelliot intelliot reopened this Apr 10, 2015
@SolomonBier
Copy link
Author

@intelliot sandbox, thought I'm still receiving the paypal error notification.

It seems that the break was added, but is still returning the paypal error I posted earlier:

I believe that hits this method:

(void)informDelegateDidFailWithError:(NSError *)error

Which then returns the below

(NSString *)ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE { return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE", [self localizationTable], [self localizationBundle], @"PayPal Error", @"Title for alert view that is displayed when Drop In submission fails because there was an error saving the PayPal account"); }

@intelliot
Copy link
Contributor

I'm looking into this now. Are you using CocoaPods, and if so, which version?

Could you provide an example project that exhibits this error? If you don't want to post it on GitHub, you may email it to me: elliot.lee@getbraintree.com

@intelliot
Copy link
Contributor

Are you testing this in the Simulator, or on a real device? Which version of iOS?

@SolomonBier
Copy link
Author

@intelliot real device, and yes I am using pods. I don't think its possible for my to email you my huge repository. I'll reach out to you via email.

@intelliot
Copy link
Contributor

Does the problem occur in the Simulator?

I've identified a potential issue with Venmo where the card selector sometimes doesn't appear, but it doesn't seem related to the error you're seeing.

@intelliot
Copy link
Contributor

Just worked with @SolomonBier to debug this issue. We successfully solved the two problems:

(1) PayPal: We were not checking the URL correctly, so the AppDelegate wasn't passing the url to Braintree.
(2) Venmo: CFBundleDisplayName must be set in Info.plist.

We should clarify our docs to make (1) easier. Also, there's a bug in our SDK that cause "PayPal Error" to display for non-PayPal errors. We'll make sure this error gets surfaced correctly in a future SDK update.

Thank you!

mickeyreiss pushed a commit to mickeyreiss/braintree_ios that referenced this issue May 18, 2015
…tch-CFBundleDisplayName-error

Fix Venmo app switch crash when CFBundleDisplayName is nil
@intelliot
Copy link
Contributor

there's a bug in our SDK that cause "PayPal Error" to display for non-PayPal errors.

Fixed in 7c1465c

intelliot referenced this issue Jun 29, 2015
saved to be more generic - it was referencing PayPal before

It now says "Connection Error" in English (en) and is localized
for other languages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants