我在我的android應用程序中集成了payfort支付網關。我已經使用rest api生成令牌 https://sbpaymentservices.payfort.com/FortAPI/paymentApi現在我必須將該令牌傳遞給fort sdk進行交易。在payfort支付網關中生成商戶參考
但是商人的參考也需要生成才能通過堡壘sdk。我無法找到關於如何生成商家參考的任何內容,而不是在payfort文檔中給出的任何內容。
我還聊到了支持,他們說,我們有我們自己的alogrithm創建商家參考
能否有人知道如何創建商家參考?任何幫助將大大正如你的代碼中使用merchant_reference爲靜態值讚賞
String device_id = FortSdk.getDeviceId(this);
Log.e("device_iddd",device_id+"");
Map<String, String> map = new HashMap<>();
map.put("command", "AUTHORIZATION");
map.put("amount",String.valueOf(1));
map.put("language", "en");
map.put("merchant_reference", "r1FANA78-ok00tH0");
map.put("currency","SAR");
map.put("customer_name", "bharat");
map.put("customer_email", "[email protected]");
map.put("order_description", "Description");
map.put("return_url", "http://faza.fazadigital.com/Faza_WS/payfortReturnPage.php");
map.put("sdk_token", "441E41CFFF2E49F2E053321E320A4884");
fortRequest.setRequestMap(map);
try {
FortSdk.getInstance().registerCallback(this, fortRequest, FortSdk.ENVIRONMENT.TEST, 10, fortCallback, new FortInterfaces.OnTnxProcessed() {
@Override
public void onCancel(Map<String, String> requestParamsMap, Map<String, String> responseMap) {
showProgress(false);
for (Map.Entry<String, String> entry : responseMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
Log.e("cancel", key + "////////" + value);
// do stuff
}
}
@Override
public void onSuccess(Map<String, String> requestParamsMap, Map<String, String> fortResponseMap) {
for (Map.Entry<String, String> entry : fortResponseMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
Log.e("responsee", key + "////////" + value);
// do stuff
}
}
@Override
public void onFailure(Map<String, String> requestParamsMap, Map<String, String> fortResponseMap) {
for (Map.Entry<String, String> entry : fortResponseMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
Log.e("failure", key + "////////" + value);
// do stuff
}
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
您可以將您的代碼對你的所作所爲到現在? –
我在這裏使用以前的商家參考...我從某處得到的,但它給出了一個錯誤「重複的訂單號」 – Cqlsys
你檢查了這一個https://testfort.payfort.com/api/? –