- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我面临的问题是,payfort API 应该返回一些 json。但是相反,我得到了一些具有一些隐藏字段的 html。我看里面没有写错误。
这是我的代码
string access_code = string.Empty,
amount = string.Empty,
currency = string.Empty,
customer_email = string.Empty,
merchant_reference = string.Empty,
order_description = string.Empty,
language = string.Empty,
merchant_identifier = string.Empty,
signature = string.Empty,
command = string.Empty;
access_code = "X78979879h8h8h8";
amount = "1000";
command = "AUTHORIZATION";
currency = "AED";
customer_email = "zetawars@hotmail.com";
language = "en";
merchant_identifier = "RaskdQuCc";
merchant_reference = "ASASASASASADSS";
order_description = "Some order details";
signature = "";
string signature_string = "PASSaccess_code="+access_code+"amount="+amount+"command="+command+"currency="+currency+"customer_email"+customer_email+"language"+language+"merchant_identifier"+merchant_identifier+"merchant_reference"+merchant_reference+"order_description"+order_description+"PASS";
signature = getHashSha256(signature_string);
string url = "https://sbcheckout.payfort.com/FortAPI/paymentPage";
string param = "access_code" + access_code + "&amount=" + amount + "¤cy=" + currency +
"&customer_email=" + customer_email + "&merchant_reference=" + merchant_reference +
"&order_description=" + order_description + "&language=" + language + "merchant_identifier="
+ merchant_identifier + "&signature=" + signature + "&command=" + command;
using (WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/json";
//wc.Headers.Add("Content-Type", "application/json");
string HtmlResult = wc.UploadString(url, param);
}
最佳答案
尝试为下面的标题添加值
wc.Headers[HttpRequestHeader.Authorization]
wc.Headers[HttpRequestHeader.TenantId]
wc.Headers[HttpRequestHeader.Client-Type]
wc.Headers[HttpRequestHeader.Protocol]
对我有用!!
关于c# - 如何在 C# 中从 payfort Apis 获取 json 结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39226096/
我正在将 Payfort 支付网关集成到我的 android 应用程序中。我正在使用 FORT SDKv1.2。在用于创建 token 的帖子 url 中,我总是收到错误“签名不匹配”。 谁能告诉我要
我在我的项目中使用 PayFort IOS SDK,遵循此处找到的文档:https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_Integration_Gui
String ACCESS_CODE = "My_PAYFORTAcces_Code" String MERCHANT_ID = "My_Payfory_Merchet_ID" 我发现了问题,我认为问
我正在将 payfort 支付网关集成到我的 android 应用程序中。我已经使用 rest api 生成了 token https://sbpaymentservices.payfort.com/
我正在开发一个具有支付服务的 iOS 应用程序。但是,我在 payfort 集成方面遇到了问题。 我一直在关注他们网站上提供的文档: https://docs.payfort.com/pdf/FORT
我正在尝试将 PayFort IOS SDK 集成到我的项目中...... 我遵循了他们文档中的步骤:https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_
我读过 documentation PayFort 支付网关。我已经设置了项目并完成了与 android SDK 的交易。交易生成和保存卡工作正常。成功交易后(使用记住卡)响应是 Success Re
我正在按照 ( https://docs.start.payfort.com/references/api/ ) 文档来实现 Payfort 支付 API,但我遇到了问题。有人能帮我解决这些问题吗?
我正在尝试将 payfort SDK 集成到我的 iOS 项目中。我正在使用 xcode 9.0 和 swift 4.0。我按照 payfort 文档上的说明进行操作。但是在我的项目中还是看不到pay
我正在使用 PayFort 收到的 PayFort Apple Pay 指南文档将 PayFort Apple Pay 集成到我的应用程序中。 我将发送文档中提到的具有相同类型值的所有强制参数。 但我
我面临的问题是,payfort API 应该返回一些 json。但是相反,我得到了一些具有一些隐藏字段的 html。我看里面没有写错误。 这是我的代码 string access_code = str
我是一名优秀的程序员,十分优秀!