Ana içeriğe geç

Card Token Oluştur

POSThttps://testpfapi.rubikpara.com/v1/Tokens

const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
data.append('CardNumber', '4119790166544284');
data.append('ExpireMonth', '04');
data.append('ExpireYear', '24');
data.append('Cvv', '961');
data.append('PublicKey', 'SkDP+k0jpMPDOzjcQ2dTcg==');
data.append('Nonce', '');
data.append('Signature', '');
data.append('ConversationId', 'test123456');
data.append('MerchantNumber', '1100000001');

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://testpfapi.rubikpara.com/v1/Tokens',
  headers: { 
    'Content-Type': 'multipart/form-data'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});