Stripe payment gateway native control

DinoNovak.3412DinoNovak.3412 ✭✭USMember ✭✭

I am trying to implement Stripe native components in iOS.
there is xamarin binding created by Naxam on https://github.com/NAXAM/stripe-ios-binding

I am trying to open a STPAddCardViewController on iOS for card and billing address entry, here is the code for my controller:

` public partial class CardViewController : UIViewController, ISTPAddCardViewControllerDelegate
{

    public override void ViewDidLoad()
    {
        base.ViewDidLoad();
        var config = STPPaymentConfiguration.SharedConfiguration();


    }

    public override void DidReceiveMemoryWarning()
    {
        base.DidReceiveMemoryWarning();
        // Release any cached data, images, etc that aren't in use.
    }


    [Export("addCardViewControllerDidCancel:")]
    public void DidCancel(STPAddCardViewController addCardViewController)
    {
        string a = "aaa";
    }


    [Export("addCardViewController:didCreateToken:completion:")]
    public void DidCreateToken(STPAddCardViewController addCardViewController, STPToken token, STPErrorBlock completion)
    {
        string a = "aaa";

    }

    [Export("addCardViewController:didCreateSource:completion:")]
    public void DidCreateSource(STPAddCardViewController addCardViewController, STPSource token, STPErrorBlock completion)
    {
        string a = "aaa";

    }
}`

View is owned and it is possible to enter card data and billing address but when user clicks continue no action is triggered.
What need to be done to get DidCreateToken or DidCreateSource executed?

Kid regards,
DiNo

Posts

  • M0BilalM0Bilal ✭✭ USMember ✭✭

    Facing the same issue in latest version. @DinoNovak.3412 how did you manage to get this working?

Sign In or Register to comment.