- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个网站,我在其中处理我用户的客户向他们(我的用户)的 Paypal 账户付款。我创建了一个 Paypal 应用程序,并在第 3 方设置下包含了处理借记卡和信用卡付款的功能。使用第三方帐户,我通过第三方权限授予了对我的用户名的访问权限。通过这些步骤,我相信我已经在 paypal 端授予了适当的访问权限。
这是我设置配置的 C# 代码:
Dictionary<string, string> PaypalConfig = new Dictionary<string, string>();
PaypalConfig.Add("account1.apiUsername", "my api username");
PaypalConfig.Add("account1.apiPassword", "my api password");
PaypalConfig.Add("account1.apiSignature", "my api signature");
PaypalConfig.Add("subject", "email address of my user");
PaypalConfig.Add("account1.applicationId", "my app id");
PaypalConfig.Add("mode", "live");
OAuthTokenCredential tokenCredential = new OAuthTokenCredential("my client id", "my client secret", PaypalConfig);
string accessToken = tokenCredential.GetAccessToken();
//Code to fill in the transaction details
//Create Payment
Payment payment = new Payment();
payment.intent = "sale";
payment.payer = payer;
payment.transactions = transactions;
Payment createdPayment = payment.Create(accessToken);
当我进行交易时,付款返回已获批准,但似乎忽略了主题,钱已存入我的帐户。
我在 https://developer.paypal.com/docs/classic/invoicing/ht_invoicing-3p/ 找到了有关为第三方发送发票的文档,但在 REST API 中,我真的没有看到任何关于处理第 3 方付款的内容。关于使用第 3 方帐户,我似乎遗漏了一些信息。感谢您的帮助!
最佳答案
为什么不使用简单的重定向选项来处理付款,这样,您只需提及用户的商家电子邮件即可。
您需要按以下格式传递变量:
private void PayPal()
{
string _MerchantEmail = "youremailwithpaypal@domain.com";
string _ReturnURL = "https://www.yourwebsite.com/paymentsuccess";
string _CancelURL = "https://www.yourwebsite.com/paymentfailed";
string _CurrencyCode = "USD";
int _Amount = 100;
string _ItemName = "itme1"; //We are using this field to pass the order number
int _Discount = 10;
double _Tax = 1.5;
string _PayPalURL = $"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business={_MerchantEmail}&return={_ReturnURL}&cancel_return={_CancelURL}¤cy_code={_CurrencyCode}&amount={_Amount}&item_name={_ItemName}&discount_amount={_Discount}&tax={_Tax}";
Response.Redirect(_PayPalURL);
}
您可能还需要 PayPal IPN 的回调 URL 来验证付款状态。但是对于您上面的问题,这应该可行,因为我们已经在我们的网站上使用了此代码。
关于c# - 通过 Paypal C# Rest API 处理第三方支付,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23484961/
在哪里可以找到有关退款状态的信息? 对于“取消”和“失败”,没关系。但是“已捕获”、“已授权”、“暂停”和“待处理”之间有什么区别。支付宝是什么意思? 谢谢 最佳答案 以下是 Paypal 付款状态列
我想问问是否有人知道无需用户交互即可进行 PayPal 付款的可能性。我目前正在开展一个项目,我们希望在用户无需登录 PayPal 的情况下按需进行 PayPal 付款。 我发现的是: 做引用交易 定
我无法找到 PayPal 提供的关于它如何处理 webhook 以进行支付的文档。付款是否与付款一样对待,以便完成的付款将启动付款完成的 webhook?一般来说,付款和支出是否通过网络 Hook 相
我有一个表单,人们可以在其中以固定金额订购一件商品。以下是步骤: 客户填写表格 客户点击提交并进入评论页面,他可以在其中检查他的输入 在评论表单中应该有一个使用 paypal 支付的按钮(带有自己的设
用了微信sdk各种痛苦,感觉比qq sdk调用麻烦多了,回调过于麻烦,还必须要在指定包名下的actvity进行回调,所以我在这里写一篇博客,有这个需求的朋友可以借鉴一下,以后自己别的项目有用到也有个
这个问题已经有答案了: 已关闭10 年前。 Possible Duplicate: How to set Azure Max Spending Limit or Cost CAP $ amount?
我正在尝试将 Stripe 集成到 Symfony2 项目上,我在他们的文档中看到的唯一付款方式是“用卡付款”按钮 https://stripe.com/docs/checkout它在我的项目上创建了
这个问题已经有答案了: 已关闭10 年前。 Possible Duplicate: How to set Azure Max Spending Limit or Cost CAP $ amount?
我想使用 firebase 作为服务器并向 stripe 发送付款请求。我在服务器端的经验为零,所以我正在寻找一种简单的方法来实现这一目标。此帖Is it possible to integrate
我在这里使用自适应 Paypal 支付控制台:https://apigee.com/console/paypal向人们付款。我无法找到一种方法在不授予他们许可的情况下向个人汇款(来 self )。我希
我一直坚持使用 OpenCart 的 PayPal 标准付款,但尚未找到解决方案。 我做了什么: 在 sandbox.paypal.com 上创建了企业帐户 设置以下网络首选项: 自动返回(指定 UR
我想在我的 WPF 应用程序中通过 PayPal 进行购物付款。我想为用户生成一个链接,但不知道如何通知应用程序已接受付款。是否唯一的解决方案将是服务器,它会检查付款是否已被接受并且应用程序会不时轮询
PayPal PayOut REST API 没有记录它的局限性。什么是: 每次付款的最大收款人数? 每次付款的最高金额? 每个收件人的最大金额? 注意: 我查看了在线文档和 paypal 论坛 (
我是 web 开发的新手,我需要做的是创建一个表单,用户可以在其中输入一些东西到一个字段中,让我们暂时称之为名称......然后当他们去 paypal 时,他们会捐赠 1 美元(预定)然后从支付给 P
我正在尝试将 PayPal 集成到我的应用程序中并了解 PayPal SDK 的工作原理我正在使用示例应用程序。我知道在用户按下“购买”按钮后,我需要将授权响应发送到我的服务器以验证付款。问题是我找不
在我的 oscar 应用程序中,django 需要自适应并行 oscar 支付程序。 谁能告诉我如何将 Adaptive Parallel Paypal 方法集成到 Normal Paypal 中。我
您好,我正在开发用于 NFC 支付的安卓应用程序。 Android 设置中有一个选项可以使用打开的应用程序而不是默认应用程序。例如,当我将默认应用程序设置为 Android Pay 并在付款前打开我的
我构建了一个使用命名空间和 PSR-0 自动加载的 PHP 应用程序。在尝试实现 Stripe库,我发现它似乎无法加载类,因为它们没有命名空间。如果我手动包含文件,有没有办法不自动加载? // Get
有人成功地将 Adyen 支付插件集成到 iOS 应用程序中吗? 我到了它向用户显示付款选项的地步,但选择其中一个选项没有任何作用。我希望它会转到表单以捕获卡的详细信息,但事实并非如此。 如有任何帮助
我正在与 Stripe Payment Gateway 集成——API 的最新版本。 除了“client_reference_id”没有传递给 webhook 或事务(没有出现在日志中)之外,这一切都
我是一名优秀的程序员,十分优秀!