如何在 Xamarin.Forms 中实现 Paypal 结帐选项?
How to implement Paypal checkout option in Xamarin.Forms?
我正在使用 Xamarin.Forms
制作一个移动商务应用程序,因为用户可以使用支付集成结帐,我必须使用贝宝方法进行结帐选项,我正在使用 [=19= .NET Standard project and project is also refer to the UWP
.我用示例检查默认贝宝,但我没有得到帮助。
我有新的支付集成方式。
任何人都可以调查一下并建议我应该怎么做吗?
您可以为此使用 Paypal Forms 插件:
在 MainActivity(Android)/AppDelegate(iOS) 之后 "Forms.Init()" 使用您的 PayPal 配置值调用 Init 方法
global::Xamarin.Forms.Forms.Init ();
var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork,"Your PayPal ID from
https://developer.paypal.com/developer/applications/")
{
//If you want to accept credit cards
AcceptCreditCards = true,
//Your business name
MerchantName = "Test Store",
//Your privacy policy Url
MerchantPrivacyPolicyUri = "https://www.example.com/privacy",
//Your user agreement Url
MerchantUserAgreementUri = "https://www.example.com/legal",
// OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided)
ShippingAddressOption = ShippingAddressOption.Both,
// OPTIONAL - Language: Default languege for PayPal Plug-In
Language = "es",
// OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In
PhoneCountryCode = "52",
};
//iOS
CrossPayPalManager.Init(config);
//Android
CrossPayPalManager.Init(config, this);
...
您可以在 Github 上找到所有重要的 API。
如有问题或类似问题,请随时回复
我正在使用 Xamarin.Forms
制作一个移动商务应用程序,因为用户可以使用支付集成结帐,我必须使用贝宝方法进行结帐选项,我正在使用 [=19= .NET Standard project and project is also refer to the UWP
.我用示例检查默认贝宝,但我没有得到帮助。
我有新的支付集成方式。
任何人都可以调查一下并建议我应该怎么做吗?
您可以为此使用 Paypal Forms 插件:
在 MainActivity(Android)/AppDelegate(iOS) 之后 "Forms.Init()" 使用您的 PayPal 配置值调用 Init 方法
global::Xamarin.Forms.Forms.Init ();
var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork,"Your PayPal ID from
https://developer.paypal.com/developer/applications/")
{
//If you want to accept credit cards
AcceptCreditCards = true,
//Your business name
MerchantName = "Test Store",
//Your privacy policy Url
MerchantPrivacyPolicyUri = "https://www.example.com/privacy",
//Your user agreement Url
MerchantUserAgreementUri = "https://www.example.com/legal",
// OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided)
ShippingAddressOption = ShippingAddressOption.Both,
// OPTIONAL - Language: Default languege for PayPal Plug-In
Language = "es",
// OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In
PhoneCountryCode = "52",
};
//iOS
CrossPayPalManager.Init(config);
//Android
CrossPayPalManager.Init(config, this);
...
您可以在 Github 上找到所有重要的 API。
如有问题或类似问题,请随时回复