Code Monkey home page Code Monkey logo

braintree-ios-binding's People

Contributors

tuyen-vuduc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

braintree-ios-binding's Issues

Localization support and custom languages

If you want to add a other language then "en" you have to add a new folder named "PUT YOUR LANGUAGE CODE HERE.lproj" (de_DE or other) to your Resources folder in your .iOS Project and add a new text file called "BTUI.strings" which contains a list of translations.

BTUI.strings

"CARD_DETAILS_LABEL"                        = "Kreditkartendaten";
"ENTER_CARD_DETAILS_HELP_LABEL"             = "Geben Sie Ihre Kreditkartendaten ein.";
"VALID_CARD_ERROR_LABEL"                    = "Sie müssen eine gültige Kartennummer angeben.";
"CARD_REQUIRED"                             = "Kartennummer ist erforderlich";
"CARD_INVALID"                              = "Kartennummer ist ungültig";
"EXPIRATION_REQUIRED"                       = "Ablaufdatum ist erforderlich";
"EXPIRATION_INVALID"                        = "Ablaufdatum ist ungültig";
"CVV_REQUIRED"                              = "%s ist erforderlich";
"CVV_INVALID"                               = "%s ist ungültig";
"POSTAL_CODE_HELP_LABEL"                    = "Geben Sie eine gültige PLZ ein.";
"POSTAL_CODE_REQUIRED"                      = "PLZ ist erforderlich";
"POSTAL_CODE_INVALID"                       = "PLZ ist ungültig";
"COUNTRY_CODE_REQUIRED"                     = "Ländervorwahl ist erforderlich";
"COUNTRY_CODE_INVALID"                      = "Ländervorwahl ist ungültig";
"MOBILE_NUMBER_REQUIRED"                    = "Handynummer ist erforderlich";
"MOBILE_NUMBER_INVALID"                     = "Handynummer ist ungültig";
"ENROLLMENT_WITH_SMS_HELP_LABEL"            = "Bei dieser Karte ist ggf. eine Registrierung erforderlich. Bei Bedarf wird ein SMS-Code an diese Nummer gesendet.";
"SMS_CODE_REQUIRED"                         = "SMS-Code ist erforderlich";
"SMS_CODE_INVALID"                          = "SMS-Code ist ungültig";

"CANCEL_ACTION"                             = "Abbrechen";
"RETRY_ACTION"                              = "Wiederholen";
"CONTINUE_ACTION"                           = "Weiter";
"ADD_CARD_ACTION"                           = "Kreditkarte hinzufügen";
"DONE_ACTION"                               = "Fertig";
"EDIT_ACTION"                               = "Bearbeiten";
"NEXT_ACTION"                               = "Weiter";
"TOP_LEVEL_ERROR_ALERT_VIEW_OK_BUTTON_TEXT" = "OK";
"SCAN_CARD_IO_ACTION"                       = "Mit card.io einlesen";

"EDIT_PAYMENT_METHOD"                       = "Zahlungsquellen bearbeiten";
"THERE_WAS_AN_ERROR"                        = "Leider ist ein Fehler aufgetreten.";
"REVIEW_AND_TRY_AGAIN"                      = "Überprüfen Sie Ihre Angaben und versuchen Sie es erneut.";
"INVALID_LABEL"                             = "Ungültig:";

"YEAR_LABEL"                                = "Jahr";
"MONTH_LABEL"                               = "Monat";

"OTHER_LABEL"                               = "Sonstige";
"CREDIT_OR_DEBIT_CARD_LABEL"                = "Kreditkarte";
"RECENT_LABEL"                              = "Zuletzt verwendet";
"SELECT_PAYMENT_LABEL"                      = "Zahlungsquelle auswählen";

"CONFIRM_ENROLLMENT_LABEL"                  = "Registrierung bestätigen";
"CONFIRM_ACTION"                            = "Bestätigen";
"ENTER_SMS_CODE_SENT_HELP_LABEL"            = "Geben Sie den SMS-Code ein, der an %s gesendet wurde.";
"SMS_CODE_LABEL"                            = "SMS-Code";
"CARD_TYPE_GENERIC_CARD"                    = "Kreditkarte";
"MOBILE_COUNTRY_CODE_LABEL"                 = "Ländervorwahl";
"SECURITY_CODE_LABEL"                       = "Kartenprüfnummer";
"CVV_FIELD_PLACEHOLDER"                     = "CVV";
"CVC_FIELD_PLACEHOLDER"                     = "CVC";
"CID_FIELD_PLACEHOLDER"                     = "CID";
"CVN_FIELD_PLACEHOLDER"                     = "CVN";
"POSTAL_CODE_PLACEHOLDER"                   = "PLZ";
"MOBILE_NUMBER_LABEL"                       = "Handynummer";
"EXPIRATION_DATE_LABEL"                     = "Gültig bis";
"CARD_NUMBER_PLACEHOLDER"                   = "Kreditkartennummer";
"EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR"        = "MM/JJJJ";
"EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR"         = "MM/JJ";

"PAYPAL"                                    = "PayPal";
"CARD_TYPE_AMERICAN_EXPRESS"                = "American Express";
"CARD_TYPE_DISCOVER"                        = "Discover";
"CARD_TYPE_DINERS_CLUB"                     = "Diners Club";
"CARD_TYPE_MASTER_CARD"                     = "MasterCard";
"CARD_TYPE_VISA"                            = "Visa";
"CARD_TYPE_JCB"                             = "JCB";
"CARD_TYPE_MAESTRO"                         = "Maestro";
"CARD_TYPE_UNION_PAY"                       = "UnionPay";
"BRANDING_COINBASE"                         = "Coinbase";
"BRANDING_VENMO"                            = "Venmo";
"BRANDING_APPLE_PAY"                        = "Apple Pay";
"BRANDING_ANDROID_PAY"                      = "Android Pay‏";
"USE_DIFFERENT_PHONE_NUMBER_ACTION"         = "Andere Nummer verwenden";
"CARD_NOT_ACCEPTED_ERROR_LABEL"             = "Karte nicht akzeptiert";

PayPalUtils Library Not Loaded

I'm attempting to use the PayPalDataColletor.iOS package, which brings in the PayPalUtils.iOS and PayPal.Risk.iOS packages.

When I run my project, I get an immediate crash, and a Library not loaded error in the console:

dyld[47818]: Library not loaded: @rpath/PayPalUtils.framework/PayPalUtils
  Referenced from: /private/var/containers/Bundle/Application/337051A0-8758-4CC9-8CDC-A146A03CE3D1/xxxxx.iOS.app/Frameworks/PayPalDataCollector.framework/PayPalDataCollector
  Reason: tried: '/private/var/containers/Bundle/Application/337051A0-8758-4CC9-8CDC-A146A03CE3D1/xxxxx.iOS.app/Frameworks/PayPalUtils.framework/PayPalUtils' (no such file), '/private/var/containers/Bundle/Application/337051A0-8758-4CC9-8CDC-A146A03CE3D1/xxxxxx.iOS.app/Frameworks/PayPalDataCollector.framework/Frameworks/PayPalUtils.framework/PayPalUtils' (no such file), '/private/var/containers/Bundle/Application/337051A0-8758-4CC9-8CDC-A146A03CE3D1/xxxxxx.iOS.app/Frameworks/PayPalUtils.framework/PayPalUtils' (no such file), '/private/var/containers/Bundle/Application/337051A0-8758-4CC9-8CDC-A146A03CE3D1/xxxxxxx.iOS.app/Frameworks/PayPalUtils.framework/PayPalUtils' (no such file), '/System/Library/Frameworks/PayPalUtils.framework/PayPalUtils' (no such file)

I've done the usual of removing bin/obj folders, clean and rebuild, restart, etc.

Any thoughts or suggestions?

iOS / Version 4.9.0 -- missing dependencies

Some packages can't be updated to the latest 4.9.0 version, due to a dependency.

Unable to resolve dependencies. 'Naxam.PayPal.Risk.iOS 4.8.2' is not compatible with 'Naxam.PayPalDataCollector.iOS 4.9.0 constraint: Naxam.PayPal.Risk.iOS (>= 4.9.0)'.

I checked in the package manager and the only/latest version available for Naxam.Paypal.Risk.iOS is 4.8.2.

Affected packages seem to be...

.Naxam.BraintreePayPal.iOS
.Naxam.PayPalDataCollector.iOS
.Naxam.PayPalOneTouch.iOS

Thank you!

App Store Connect Release not possible with PaymentFlow.iOS

I am having the same issue as #7 with CardinalMobile build but its a little different.

I am using the BraintreePaymentFlow.iOS 4.35.0.1, because I want to make use of the new 3D Secure flow, which references CardinalMobile.iOS 2.2.3.1 and if I submit my app like that it gets rejected instantly as per issue #7.

If I just update the CardinalMobile.iOS version to 2.2.3.2 my app no longer gets rejected but instantly crashes when launching.

This is the only change I make, and it works while debugging on the Simulator but the moment I upload it and download it onto a physical device using TestFlight it just crashes on launch.

Does the BraintreePaymentFlow.iOS also need updating to use the new version of Cardinal??

App Store Connect Release not possible

I am using the latest versions of Naxam.BraintreeDropIn.iOS (8.1.1) and Naxam.BraintreePayPal.iOS (4.35.0) in my Xamarin app. Everything works fine, but Apple does not accept my app bundle:

"ITMS-90338: Non-public API usage - The app references non-public selectors in App: setErrorDetail:, setTransactionID:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/"

Prior versions are working and I can upload them to the app store as well.
I searched for the mentioned symbols (setErrorDetails and setTransactionID) both are contained in the following assembly:
Naxam.CardinalMobile.iOS.dll

BTPaymentFlowDriver.StartPaymentFlow crashing

I tried implement verify a credit card with 3DS.

public async Task<CreditCardTokenizationResultDto> TokenizeAsync(string cardNumber, DateTime expirationDate, string cvv, string clientToken, string amount)
        {
            Task<CreditCardTokenizationResultDto> tokenizeTask = new Task<CreditCardTokenizationResultDto>(() => _result);

            
            BTAPIClient apiClient = new BTAPIClient(clientToken);
            BTCardClient cardClient = new BTCardClient(apiClient);
            BTCard card = new BTCard(cardNumber, expirationDate.Month.ToString(), expirationDate.Year.ToString(), cvv);

            cardClient.TokenizeCard(card, (result, error) =>
            {
                _result = new CreditCardTokenizationResultDto(result.Description, expirationDate, cvv, result.Nonce);
                tokenizeTask.Start();
            });

            await tokenizeTask;

            Task secureCheckTask = new Task(() => { });

            BTThreeDSecureRequest request = new BTThreeDSecureRequest();
            request.Amount = 1;
            request.Nonce = _result.Nonce;
            
            BTPaymentFlowDriver bTPaymentFlowDriver = new BTPaymentFlowDriver(apiClient);
            bTPaymentFlowDriver.ViewControllerPresentingDelegate = this;

            Action<BTPaymentFlowResult, NSError> action = (nonce, error) =>
            {
                // TODO check 3DS result
                secureCheckTask.Start();
            };

            bTPaymentFlowDriver.StartPaymentFlow(request, action);

            await secureCheckTask;

            return tokenizeTask.Result;
        }

And line bTPaymentFlowDriver.StartPaymentFlow(request, action); crashes with this error:

Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Native stack trace:
	0   CoreFoundation                      0x00000001e79e5294 <redacted> + 252
	1   libobjc.A.dylib                     0x00000001e6bbf9f8 objc_exception_throw + 56
	2   CoreFoundation                      0x00000001e795ece8 _CFArgv + 0
	3   CoreFoundation                      0x00000001e78e69a8 <redacted> + 352
	4   CoreFoundation                      0x00000001e78d7584 <redacted> + 64
	5   BraintreePaymentFlow                0x000000010c08a884 __93-[BTPaymentFlowDriver(ThreeDSecure) lookupThreeDSecureForNonce:transactionAmount:completion:]_block_invoke + 144
	6   libdispatch.dylib                   0x00000001e7424a38 <redacted> + 24
	7   libdispatch.dylib                   0x00000001e74257d4 <redacted> + 16
	8   libdispatch.dylib                   0x00000001e73d3004 <redacted> + 1068
	9   CoreFoundation                      0x00000001e7976c1c <redacted> + 12
	10  CoreFoundation                      0x00000001e7971b54 <redacted> + 1924
	11  CoreFoundation                      0x00000001e79710b0 CFRunLoopRunSpecific + 436
	12  GraphicsServices                    0x00000001e9b7179c GSEventRunModal + 104
	13  UIKitCore                           0x00000002141a7978 UIApplicationMain + 212
	14  citybee.iOS                         0x0000000103fd3fe0 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 400
	15  citybee.iOS                         0x0000000103f0a2c4 UIKit_UIApplication_Main_string___intptr_intptr + 68
	16  citybee.iOS                         0x0000000103f0a21c UIKit_UIApplication_Main_string___string_string + 92
	17  citybee.iOS                         0x0000000102ea01b8 CityBee_iOS_Application_Main_string__ + 152
	18  citybee.iOS                         0x00000001032a2a4c wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 284
	19  citybee.iOS                         0x00000001068f605c mono_jit_runtime_invoke + 1100
	20  citybee.iOS                         0x00000001069aea34 mono_runtime_invoke_checked + 148
	21  citybee.iOS                         0x00000001069b4f6c mono_runtime_exec_main_checked + 120

Can you help me?

Paypal option not showing up on DropIn UI for iOS

Hi,

I am trying to implement the DropIn UI in my Xamarin app and it works perfectly for Android. Both the credit card and PayPal button shows up in the DropIn UI. However I am struggling with getting the PayPal button to show up for iOS. So I followed all the steps for iOS to activate PayPal, but can’t seem to get this to work.

I included the following packages in my project:

Naxam.BraintreeCard.iOS
Naxam.BrainTreeCore.iOS
Naxam.BraintreeDataCollector.iOS
Naxam.BraintreeDropIn.iOS
Naxam.BraintreePaymentFlow.iOS
Naxam.BraintreePayPal.iOS
Naxam.BraintreeUI.iOS
Naxam.PayPal.Risk.iOS
Naxam.PayPalDataCollector.iOS
Naxam.PayPalOneTouch.iOS
Naxam.PayPalUtils.iOS

I add the new URL Type inside my AppDelegate.
BraintreeCore.BTAppSwitch.SetReturnURLScheme(“com.app.name.payments");

I add the App Switch handlers in my application delegate to handle the callback URL.

Please help me figure out what I could possibly be missing.

Thanks 


Exception consistently thrown attempting to complete a transaction using ApplePay

After upgrading Naxam.BraintreeApplePay from v4.8.2 to v4.9.0, I'm getting an exception every time I try to complete a braintree payment via ApplePay:

System.MemberAccessException: Cannot create an instance of BraintreeApplePay.BTApplePayCardNonce because it is an abstract class occurred.

This occurs after using PKPaymentAuthorizationViewController to put up the ApplePay UI. In my implementation of the IPKPaymentAuthorizationViewControllerDelegate DidAuthorizePayment method, I call:

        var brainTreeClient = new BTAPIClient(m_paymentDetails.ClientToken);
        var applePayClient = new BTApplePayClient(brainTreeClient);
        applePayClient.TokenizeApplePayPayment(payment, DidAuthorizePaymentComplete);

and then the above exception is thrown before DidAuthorizePaymentComplete is ever called.

This worked without a problem when using v4.8.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.