Angularjs 来自ionic 3的HTTP POST请求-PayFort集成(重定向模式)

Angularjs 来自ionic 3的HTTP POST请求-PayFort集成(重定向模式),angularjs,http,ionic-framework,payfort,Angularjs,Http,Ionic Framework,Payfort,我正在尝试将PayFort集成到一个ionic应用程序中。 ionic没有可用的SDK,所以我正在集成重定向模式,我们只需从供应商处打开一个网页 在ionic上使用HttpClient let data = JSON.stringify({ 'access_code' : 'xxxxxxxx', 'amount' : '10000', 'command' : 'AUTHORIZATION', 'currency' : 'SAR', 'customer_email' : 'te

我正在尝试将PayFort集成到一个ionic应用程序中。 ionic没有可用的SDK,所以我正在集成重定向模式,我们只需从供应商处打开一个网页

在ionic上使用HttpClient

let data = JSON.stringify({
  'access_code' : 'xxxxxxxx',
  'amount' : '10000',
  'command' : 'AUTHORIZATION',
  'currency' : 'SAR',
  'customer_email' : 'test@payfort.com',
  'language' : 'en',
  'merchant_identifier' : 'xxxxxxxx',
  'merchant_reference' : 'xxxxx-xxxxx-xxxx-xxxxx',
  'payment_option' : 'MASTERCARD',
  'signature' : 'xxxxxxxxxxxxxxxxxxxxxx' });


return new Promise((resolve, reject) => {
this.http
.post(apiUrl,data,options)
.subscribe(
  data => {
    console.log("Success: ",data);
    resolve(data);
  },
  error=>{
    console.log("Error:",error);
    reject(error);
  }
);
})
执行此代码后,PayFort返回“Parameters Missing”错误

同样的参数也适用于PHP和HTML

还尝试了以下参数格式

let dataString = 'access_code=xxxxxxxxxxx&amount=10000&command=AUTHORIZATION&currency=SAR&customer_email=test@payfort.com&language=en&merchant_identifier=xxxxxxx&merchant_reference=xxxxxxxxxx&payment_option=MASTERCARD&signature=xxxxxxxx'

let dataStringInJSON = {'access_code=xxxxxxxxxxx&amount=10000&command=AUTHORIZATION&currency=SAR&customer_email=test@payfort.com&language=en&merchant_identifier=xxxxxxx&merchant_reference=xxxxxxxxxx&payment_option=MASTERCARD&signature=xxxxxxxx'}


let dataJSON = {
  'access_code' : 'xxxxxxxx',
  'amount' : '10000',
  'command' : 'AUTHORIZATION',
  'currency' : 'SAR',
  'customer_email' : 'test@payfort.com',
  'language' : 'en',
  'merchant_identifier' : 'xxxxxxxx',
  'merchant_reference' : 'xxxxx-xxxxx-xxxx-xxxxx',
  'payment_option' : 'MASTERCARD',
  'signature' : 'xxxxxxxxxxxxxxxxxxxxxx' }

请尝试发送JSON对象而不是JSON字符串

let data = Your JSON object

正如问题最后一部分所述,它已经试过了。请看“let dataJSON={……”。您可以尝试以下链接:您好,我也在使用带payfort重新定向模式的ionic 3。在浏览器事件url中,我收到了fort id。但我不知道如何获取所有详细信息。请您指导我如何与payfort进行集成。谢谢