xamarin - 如何在 Xamarin.Forms 中实现 Paypal 结帐选项?

标签 xamarin xamarin.forms paypal payment-gateway payment

我正在使用 Xamarin.Forms 创建一个移动商务应用程序,因为用户可以使用支付集成进行结帐,我必须使用 paypal 方法进行结帐选项,我正在使用 < strong>.NET Standard 项目和项目也引用了UWP。我用示例检查默认 Paypal ,但没有得到帮助。

我有新的支付集成方法。

谁能调查一下并建议我应该怎么做?

最佳答案

您可以使用 Paypal Forms为此的插件:

在“Forms.Init()”之后的 MainActivity(Android)/AppDelegate(iOS) 中,使用您的 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 - 如何在 Xamarin.Forms 中实现 Paypal 结帐选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55059081/

相关文章:

listview - 如何在Xamarin.Forms中调整水平ListView的大小?

xamarin - 对于现有 Android 应用程序,我应该选择 Xamarin native 还是 Xamarin.Forms?

android - 将 Xamarin 表单更新到 5.0.0.2401 后,Xamarin 表单 android 抛出空异常

paypal - 将资金从商户账户转移到信用卡/借记卡持有人银行,可能使用 ACH

python - 删除(或预填)PayPal Express Checkout 的地址详细信息

android - 使用 Xamarin 在 Visual Studio 2013 中缺少 Android 3.1 SDK

android - TextView 中每行最多 "X"个字符?

c# - Xamarin 在 iOS、Android 和 Core 项目之间共享代码

android - AbsoluteLayout 不填满屏幕

security - Paypal 和微软 WebAPI : best security approach