get_payment_method


Questa chiamata elenca tutti i metodi di pagamento disponibili durante la fase di checkout del basket.



Call parameters:


Parameter

Required

Note

uid

yes

Id client

pid

yes

Id Portal

lid

yes

id Language

key

yes

Code of authentication

api_version  

yes

Version API.

request

yes

Name of function request



Reply parameters:


Parametro

Always present

Note

success

si

true o false, shows if the operation gets positive ending or not.

rc

si

return code.

message

si

Error message

num_rows

si ( se rc >= 0)

Number of lines obtained from request

rows

yes ( if rc >= 0 and there are couriers)

Bow data section

    cod

yes ( if rc >= 0 and there are couriers)

Payment method code

    name

yes ( if rc >= 0 and there are couriers)

Name payment method

    credit_card

yes

Shows if payment method is a credit card.



This call can have the following error message


  • -2  Access Denied
  • -4  Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
  • -14 Unable to proceed. User does not have permission to perform this action


In case of error -2, -4 e -14, it will not be shown neither “items” gap nor messages detail..



Json request structure:


{

    "uid"         : "12345",

    "pid"         : "2",

    "lid"         : "1",

    "key”         : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

    "api_version" : "1.0.0",

    "request"     : "get_payment_method",

}



Example of php request:


$data = array(


               "uid"             => 12345,

               "pid"             => 2,

               "lid"             => 1,

               "key"             => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

               "api_version"        => "1.0.0",

               "request"                => "get_payment_method",

);




$data = array('data' => json_encode($data));


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://dev.dropshippingb2b.com/api/");

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);


$ce = curl_exec($ch); // in $ce la risposta alla chiamata

echo $ce;

curl_close($ch);



Example of a positive response without record


{

    "success": true,

    "rc": 0,

    "message": "",

    "num_rows":0

}



Example of a positive response with more records


{

    "success": true,

    "rc": 0,

    "message": "",

    "num_rows": 3,

    "rows": [{

        "cod": "1",

        "name": "Advanced Bank Transfer",

        "credit_card" : false

     }, {

        "cod": "p",

        "name": "PayPal",

        "credit_card" : false

     }, {

        "cod": "V",

        "name": "Visa",

        "credit_card" : true

     }, {

    }]

}



Example of negative response:


{

  "success": false,

  "rc": -4,

  "message”: "Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it"

}











































Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator