Payment Gateways


Overview

The payment gateways API allows you to view, and update individual payment gateways. Results are not paginated - all gateways will be returned.


Retrieve an payment gateway

This API lets you retrieve and view a specific payment gateway.

retrievePaymentGateway({@required String id})

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

    wcStore.retrievePaymentGateway({@required String id}).then( (paymentGateWay) {
        print(paymentGateWay.toJson());
    });
});

Response

ApiData instance

Represents the following object - WooCommerce retrieve an payment gateway


List all payment gateways

This API helps you to view all the payment gateways.

getPaymentGateways()

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

  wcStore.getPaymentGateways().then( (apiData) {
      print(apiData.toJson());
  });

});

Response

List<PaymentGateWay> instance

Represents the following object - WooCommerce list all payment gateways


Update a payment gateway

This API lets you make changes to a payment gateway.

updatePaymentGateway({})

Parameters

@required String id,
Map<String, dynamic> data

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

  wcStore.updatePaymentGateway(
      {@required String id, Map<String, dynamic> data}
      ).then( (paymentGateWay) {
      print(paymentGateWay.toJson());
  });
});

Response

PaymentGateWay instance

Represents the following object - WooCommerce update a payment gateway