Product Docs Help

Get account info

This is the example for getAccountinfo. The documentation for can be found here

{ "credentials": { "id": "12345", "hash": "3601ec7c5b97fafc35ed8084e3e299710a8aa8bcb44fa6669909482b39ccad486ee05e43f5e5ecbafed7e783421e5c9cdb455aeed7fe16facf212ae9871780e0", "version": "2.5.0", "client": "Pluginname:Qvickly:1.0", "language": "sv", "time": 1714838585.980936 }, "data": { "comingFromPF2": "1" }, "function": "getAccountinfo" }
<?php declare(strict_types=1); require '../../../vendor/autoload.php'; use Dotenv\Dotenv; $dotenv = Dotenv::createImmutable(__DIR__ . '/../../..'); $dotenv->load(); use Qvickly\Api\Payment\PaymentAPI; use Qvickly\Api\Payment\DataObjects\Data; use Qvickly\Api\Payment\DataObjects\PaymentData; $paymentAPI = new PaymentAPI($_ENV['EID'], $_ENV['SECRET'], testMode: true); $data = new Data( [ "PaymentData" => new PaymentData([ "comingFromPF2" => "1" ]) ] ); $payment = $paymentAPI->getAccountInfo($data); print_r($payment);

Full example can be found here

This code requires our composer package qvickly/api

composer require qvickly/api
<?php include('../PaymentAPI.php'); $test = true; $debug = false; /* Credentials for Auth */ $id = "12345"; $key = "123451234512"; define("QVICKLY_SERVER", "2.5.0"); // API version define("QVICKLY_CLIENT", "Pluginname:Qvickly:1.0"); define("QVICKLY_LANGUAGE", "sv"); $api = new PaymentAPI($id, $key, $test, $debug); $values = array(); $values['comingFromPF2'] = "1"; echo json_encode($api->getAccountinfo($values), JSON_PRETTY_PRINT);

Full example can be found here

using System; using System.Collections.Generic; using System.Linq; using System.Text; using BillmateAPI; namespace GetAccountInfo { class Program { static void Main(string[] args) { try { Boolean ssl = false; Dictionary referrer = new Dictionary(); referrer["HTTP_X_REAL_IP"] = "127.0.0.1"; Billmate bm = new Billmate("12345", "123451234512",ssl,true,false,referrer); bm.Client = "Pluginname:Qvickly:1.0"; bm.Server = "2.5.0"; bm.Language = "sv"; Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters["comingFromPF2"] = "1"; Dictionary<string, object> result = bm.Call("getAccountinfo", parameters); // Output it in Console result.ToList().ForEach(x => Console.WriteLine(x.Key + ":" + x.Value)); } catch (BillmateException be) { Console.WriteLine(be.ErrorMessage); Console.WriteLine(be.ErrorLogs); } Console.ReadLine(); } } }
import { QvicklyPaymentAPI } from "../../PaymentAPI.js"; const paymentAPI = new QvicklyPaymentAPI(process.env.EID, process.env.SECRET); const account = await paymentAPI.call("getAccountInfo", { comingFromPF2: "1" }); console.log(account);

Full example can be found here

import {QvicklyPaymentAPI, env} from "../../PaymentAPI.ts"; const paymentAPI = new QvicklyPaymentAPI(env["EID"], env["SECRET"]); const account = await paymentAPI.call("getAccountInfo", { comingFromPF2: "1" }); console.log(account);

Full example can be found here

import QvicklyPaymentAPI from "../../PaymentAPI"; const paymentAPI = new QvicklyPaymentAPI(Bun.env.EID, Bun.env.SECRET); const account = await paymentAPI.call("getAccountInfo", { comingFromPF2: "1" }); console.log(account);

Full example can be found here

from PaymentAPI import PaymentAPI # Create a PaymentAPI object api = PaymentAPI(eid, secret) account = api.call(function="getAccountinfo", data={ "comingFromPF2": "1" }) print(json.dumps(account, indent=4))

Full example can be found here

#!/usr/bin/perl use strict; use warnings; use JSON::PP; use Data::Dumper; use lib '../..'; require "PaymentAPI.pl"; require "LoadEnv.pl"; LoadEnv('../../.env'); my $test = 0; my $debug = 0; # Credentials for Auth my $id = $ENV{"EID"}; my $key = $ENV{"SECRET"}; my $api = PaymentAPI->new($id, $key, $test, $debug); my $values = { 'comingFromPF2' => "1" }; print(Dumper($api->call("getAccountinfo", $values))); 1;

Full example can be found here

Response from server

{ "credentials": { "hash": "3f8b36d6daa225bfa4a714335730f045f81f1b5111a1ed272164a99c56f15e295bca643912ac30b2920a14e53ee6134f0aa616c0ebcd8eab596264a1ff0f080e", "logid": "1234567" }, "data": { "company": "Qvickly Test", "street": "Testvägen 1", "zip": "123 45", "city": "Testinge", "country": "Sweden", "phone": "0123-456 78", "email": "test@example.com", "orgregnr": "555555-5555", "vatregnr": "SE555555555501", "language": "sv", "paymentoptions": [ { "method": "1", "currency": "SEK,DKK,NOK,GBP,EUR,USD", "language": "sv,da,no,en" }, { "method": "2", "currency": "SEK,DKK,NOK,GBP,EUR,USD", "language": "sv,da,no,en" }, { "method": "4", "currency": "SEK", "language": "sv,da,no,en" }, { "method": "8", "currency": "SEK,DKK,NOK,GBP,EUR,USD", "language": "sv,da,no,en" } ], "defaultpaymentterms_company": "20", "defaultpaymentterms_private": "5", "checkout": "1", "force2have18years": "0", "force2havepno": "0", "force2havephonenumber": "1", "locknameforshipping": "0", "showPf2Fee": "0", "parkrightCustomerService": "0", "enableparkright": "0", "enableTestModeCheckout": "1", "allow2When1FailsInCheckout": "1", "enableSpecificationInPayLink": "1", "continueWithoutPnoInPF2": "0", "checkoutAvailableCustomerTypes": [ "company", "person" ], "logo": "https://example.com/companylogos/logo.png" } }
Last modified: 13 September 2024