<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://wl.walletone.com/checkout/checkout/Index",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_MERCHANT_ID\"\r\n\r\n168404015173\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_PAYMENT_AMOUNT\"\r\n\r\n100.00\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_CURRENCY_ID\"\r\n\r\n643\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_DESCRIPTION\"\r\n\r\nОплата демонстрационного заказа\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_SUCCESS_URL\"\r\n\r\nhttp://ya.ru\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"WMI_FAIL_URL\"\r\n\r\nhttp://google.ru\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
# Database
db:
image: percona:latest
container_name: ваше_любое_имя.db
...
DATABASE_URL=mysql://root:password@db:3306/name_database
# Development configuration
version: "3.1"
services:
# Php application
app:
container_name: ваше_любое_имя.app
build:
context: .
dockerfile: ./docker/php/Dockerfile-dev <--- укажите ваш Dockerfile
restart: on-failure
volumes:
- .:/www
- ./docker/php/log:/var/log
- ./docker/php/usr/local/etc/php/conf.d:/usr/local/etc/php/conf.d
depends_on:
- db
links:
- db
expose:
- 9000
environment:
PHP_INI_SCAN_DIR: ":/usr/local/etc/php/conf.d"
# Database
db:
image: percona:latest
container_name: ваше_любое_имя.db
restart: on-failure
ports:
- 127.0.0.150:3306:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=rusaddress
- MYSQL_ROOT_HOST=%
# Nginx api server
nginx-api:
container_name: ваше_любое_имя.nginx-api
image: nginx:latest
restart: on-failure
volumes:
- ./docker/nginx/dev/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/dev/sites-enabled/vhost-api.conf:/etc/nginx/sites-enabled/vhost-api.conf
ports:
- 127.0.0.150:8090:80
depends_on:
- app
expose:
- 80
command: ["nginx", "-g", "daemon off;"]
# Nginx admin server
nginx-admin:
container_name: ваше_любое_имя.nginx-admin
image: nginx:latest
restart: on-failure
volumes:
- ./docker/nginx/dev/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/dev/sites-enabled/vhost-admin.conf:/etc/nginx/sites-enabled/vhost-admin.conf
ports:
- 127.0.0.150:8091:80
depends_on:
- app
expose:
- 80
command: ["nginx", "-g", "daemon off;"]
db:
image: percona:latest
container_name: mysite.db
restart: on-failure
ports:
- 127.0.0.150:3306:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=rusaddress
- MYSQL_ROOT_HOST=%
private $_pacs = array(
'host' => 'Здесь имя службы',
'db' => 'pacsdb',
'user' => 'root',
'password' => 'admin'
);
# Database
db: <----- имя службы
image: percona:latest
container_name: rusaddress.db
restart: on-failure
ports:
- 127.0.0.150:3306:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=rusaddress
- MYSQL_ROOT_HOST=%