post http://api.vr-pay-secure.de/v1.0/Design/
Note for NodeJS: You need to install the following modules:
npm i axios crypto-js qs
Response
Note for NodeJS: You need to install the following modules:
npm i axios crypto-js qs
xxxxxxxxxx
57<?php
use VRpay\Models\Request\Design;
use VRpay\VRpay;
use VRpay\VRpayException;
spl_autoload_register(function ($class) {
$root = dirname(__DIR__);
$classFile = $root . '/lib/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($classFile)) {
require_once $classFile;
}
});
// $instanceName is a part of the url where you access your vr pay installation.
// https://{$instanceName}.vr-pay-secure.de
$instanceName = 'YOUR_INSTANCE_NAME';
// $secret is the vr pay secret for the communication between the applications
// if you think someone got your secret, just regenerate it in the vr pay administration
$secret = 'YOUR_SECRET';
$vrpay = new VRpay($instanceName, $secret);
$design = new Design();
$design->setDefault(false);
$design->setName('Example Design (via API)');
$design->setHeaderImageShape('square'); // square, rectangular or round
$design->setLogoBackgroundColor('FFFFFF'); // Hex code