get_payment_method
Questa chiamata elenca tutti i metodi di pagamento disponibili durante la fase di checkout del basket.
Chiamata parametri:
Parametro  | 
Obbligatorio  | 
Default  | 
Note  | 
uid  | 
si  | 
Id cliente  | 
|
pid  | 
si  | 
Id Portale  | 
|
lid  | 
si  | 
id Lingua  | 
|
key  | 
si  | 
Codice di autenticazione  | 
|
api_version  | 
si  | 
Versione API.  | 
|
request  | 
si  | 
Nome della funzione richiesta  | 
Risposta parametri:
Parametro  | 
Sempre Presente  | 
Note  | 
success  | 
si  | 
true o false, indica se l'operazione ha avuto buon esito o meno  | 
rc  | 
si  | 
return code.  | 
message  | 
si  | 
Messaggio di errore  | 
num_rows  | 
si ( se rc >= 0)  | 
numero di righe ottenute dalla richiesta  | 
rows  | 
si ( se rc >= 0 e ci sono corrieri)  | 
Nodo della sezione dati  | 
cod  | 
si ( se rc >= 0 e ci sono corrieri)  | 
codice Metodo Pagamento  | 
name  | 
si ( se rc >= 0 e ci sono corrieri)  | 
Nome Metodo Pagamento  | 
credit_card  | 
si  | 
Indica se il metodo di pagamento è una carta di credito.  | 
Questo parte del messaggio può avere come messaggi d'errore
- -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
 
Nel caso di errori -2, -4 e -14, non sarà presente il campo items e quindi neppure il dettaglio dei singoli messaggi.
Struttura Chiamate JSON
{ "uid" : "12345", "pid" : "2", "lid" : "1", "key” : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" : "1.0.0", "request" : "get_payment_method", }  | 
Struttura Chiamata php
$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);  | 
Esempio di Risposta positiva con nessun record
{ "success": true, "rc": 0, "message": "", "num_rows":0 }  | 
Esempio di Risposta positiva con più record
{ "success": true, "rc": 0, "message": "", "num_rows": 3, "rows": [{ "cod": "1", "name": "Advanced Bank Wire", "credit_card" : false }, { "cod": "p", "name": "PayPal", "credit_card" : false }, { "cod": "V", "name": "Visa", "credit_card" : true }, { }] }  | 
Una risposta Json negativa possibile:
{ "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: Easy to use tool to create HTML Help files and Help web sites