User Login

Please enter user name and password into following boxes!

If you are not registered yet, please click

Forget Password

If you forget your password, please click
favorite

Ionic 3 Axios Library Usage

import * as queryString from 'querystring';

async send(order) {
    const response = await axios.post('/isbank/send', queryString.stringify(
    {
        orderNo: order.orderNo,
        amount: order.amount,
        currencyCode: '949',
        language: 'tr',
        'creditCard.cardType': '1',
        'creditCard.cv2': order.cvc,
        'creditCard.expiredMonth': order.expiredMonth,
        'creditCard.expiredYear': order.expiredYear,
        'creditCard.pan': order.number,
        'user.Email': order.email,
        'user.Id': order.userId
        }))
        .then((response) => {
            return response.data;
        });
        return response;
    }

Normally, axios requests are json based, but if you want to send request classic form based use querystring library which is imported at line 1

Notice that at line 1, async keyword is used before function name, and await keyword is used before axios.post method at line 2.

Also at line 2, we should use constant variable, so const keyword is used.

send() function call:

const result = await  send(order);


PayPal - The safer, easier way to pay online!


Comments About Tutorial

There is no comment



Add Comment

Name*
Surname* 
Email* 
Subject* 
What is (12 + 5) :
WARNING

Please fill all text boxes

Message Result

Your comment is saved. After approved, it will be published

An Error Occured

We are sorry, your request cannot be continued try again later

LOGIN REQUESTED

Please login for this operation
Login