Git Product home page Git Product logo

xam.paypal.ios's People

Contributors

markjackmilian avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

xam.paypal.ios's Issues

Demo - Adding Shipping Address Causes Crash

Hello there,

I am trying to add a shipping address to the demo app just to see if it works, but it is crashing. I was wondering if you might be able to help me figure out what I'm doing wrong?

In my ViewDidLoad within Xam.PayPal.iOS.Demo/ViewController.cs, I changed the appropriate line to allow for a provided address, instead of .PayPal I now have .Provided:

...
_payPalConfig.PayPalShippingAddressOption = PayPalShippingAddressOption.Provided;
...

Next, within Xam.PayPal.iOS.Demo/ViewController.cs, I've changed the PayNowTouched method to include a PayPalShippingAddress:

partial void PayNowTouched(Foundation.NSObject sender)
{
    var payment = PayPalPayment.PaymentWithAmount(new Foundation.NSDecimalNumber(24.12), "EUR", "Mark Jack Milian", PayPalPaymentIntent.Sale);

    var address = new PayPalShippingAddress(){
        RecipientName = "DG Test" ,
        Line1 = "1600 Pennsylvania Ave NW",
        Line2 = "",
        City = "Washington",
        State = "DC",
        PostalCode = "20500"//,
        //CountryCode = "USA",
    };
    
    payment.ShippingAddress = address;

    var paymentViewController = new PayPalPaymentViewController(payment, _payPalConfig, this._myDelegate);
    this.PresentViewController(paymentViewController, true, null);
}

The following exception gets thrown when the new PayPalPaymentViewController is created (second to last line of PayNowTouched):

Unhandled Exception:

System.Exception: Could not initialize an instance of the type 'Xam.PayPal.iOS.PayPalPaymentViewController': the native 'initWithPayment:configuration:delegate:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. occurred

Any help would be greatly appreciated. Do I need to make changes to Xam.PayPal.iOS\ApiDefinition.cs?

Thanks!

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.