Using STPAddCardViewController
dinonovak opened this issue · 2 comments
I am trying to open STPAddCardViewController (I need customer to enter card number and billing info) so that token is calculated.
I updated the sample with my PublishableKey.
code for my class:
`namespace StripeQs
{
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";
}
}
}
`
But when running the app in simulator and entering the card number and billing info following error is produced:
Failed to compute the token reference for the type 'StripeSdk.ISTPSourceProtocol, Naxam.Stripe.iOS, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null' because the assembly couldn't be found in the list of registered assemblies.
please advise what am I doing wrong
Plz check the latest version, v13.1, to see if you are still facing the issue.
@tuyen-vuduc Please could you help me update this library ? I've made the bindings for the latest native objective-c version build correctly, but I'm facing weired errors, Here is the stackoverflow question corresponding to the errors I'm facing: https://stackoverflow.com/questions/62071960/xamarin-ios-objective-c-binding-library-could-not-create-an-native-instance-of-t?noredirect=1#comment109803217_62071960