php login VladykaAndrey ya ru password wYSVe6SxcSl3VQzHZe8P amount 30

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
$login = 'VladykaAndrey@ya.ru';
$password = 'wYSVe6SxcSl3VQzHZe8P';
$amount = '30'; //30 rur test paid
$cc = '5168360002641905';
$m = '09';
$y = '16';
$cvv2 = '044';
$ch = curl_init();
$tmpcook = 'tmpcook/' . time() . '-' . rand(1000, 9999) . '.cook';
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
//CURLOPT_FOLLOWLOCATION => true,
CURLOPT_COOKIEFILE => $tmpcook,
CURLOPT_COOKIEJAR => $tmpcook,
CURLOPT_URL => 'https://reg.2domains.ru/login.php',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'email' => $login,
'passwd' => $password,
'login' => null
)
));
curl_exec($ch); //create 2domains session
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://reg.2domains.ru/billing/pay.php',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'amount' => $amount,
'pay_system_type' => 'RC',
'pay' => null
)
));
$res = curl_exec($ch);
preg_match('/InvId" value="(\d+)"/', $res, $inv);
preg_match('/SignatureValue" value="([0-9a-f]+)"/', $res, $signature);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://2domains.ru/payment/index.php',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'OutSum' => $amount,
'InvId' => $inv[1],
'SignatureValue' => $signature[1],
'Email' => $login,
'PanelId' => '1',
'phone1' => '',
'address1' => '',
'city' => '',
'zip' => ''
)
));
curl_exec($ch);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://2domains.ru/payment/init.php',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'order_id' => $inv[1],
'panel' => '1',
'amount' => $amount,
'user' => $login,
'phone1' => '',
'address1' => '',
'city' => '',
'zip' => '',
'pid' => '68' //Visa/MC
)
));
$res = curl_exec($ch);
preg_match('/total_amount" value="([\d\.]+)"/', $res, $usd);
preg_match('/checksum" value="([a-z0-9]+)"/', $res, $checksum);
preg_match('/invoice_id" value="(\d+)"/', $res, $invoice);
preg_match('/merchant_id" value="(\d+)"/', $res, $merchant);
preg_match('/time_stamp" value="(.*?)"/', $res, $ts);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://secure.gate2shop.com/ppp/purchase.do',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(array(
'merchant_site_id' => '115128',
'merchant_id' => $merchant[1],
'time_stamp' => $ts[1],
'total_amount' => strval($usd[1]),
'currency' => 'USD',
'checksum' => $checksum[1],
'item_name_1' => 'Пополнение баланса (' . $login . ')',
'item_amount_1' => strval($usd[1]),
'item_quantity_1' => '1',
'version' => '3.0.0',
'payment_method' => 'cc_card',
'email' => $login,
'country' => 'RU',
'encoding' => 'utf-8',
'merchantlocale' => 'ru_RU',
'invoice_id' => $invoice[1],
'merchant_unique_id' => $invoice[1],
'phone1' => '',
'address1' => '',
'city' => '',
'zip' => ''
)))
);
$res = curl_exec($ch);
preg_match('/ssid" value="([a-z0-9]+)"/', $res, $ssid);
preg_match('/msid" value="(\d+)"/', $res, $msid);
preg_match('/CSRFToken" value="([a-z0-9]+)"/', $res, $csrf);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://secure.gate2shop.com/ppp/review.do',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(array(
'ssid' => $ssid[1],
'msid' => $msid[1],
'locale' => 'ru_RU',
'currency' => 'USD',
'original_currency' => '',
'preferred_currency' => '',
'show_currnecy_popup' => 'true',
'country_hidden' => 'RU',
'pppAction' => '',
'indexOfItemToRemove' => '',
'indexOfSubscriptionToRemove' => '',
'subscriptionId' => '',
'isShoppingCartAction' => 'false',
'indexOfItemWithChangedQuantity' => '',
'isRebillingHidden' => 'false',
'amount' => $usd[1],
'CSRFToken' => $csrf[1],
'email' => $login,
'phone1' => '38050' . rand(1000000, 9999999),
'address1' => 'Mayakovskogo, ' . rand(1, 999),
'city' => 'Kyiv',
'state' => '',
'state_value' => '',
'zip' => rand(10000, 99999),
'payment_method' => 'cc_card',
'cielo_card_brand' => '',
'selected_cielo_card_brand' => '',
'cc_name_on_card' => 'Justin Bieber',
'nettelerAccount' => '',
'cc_card_number' => $cc,
'nettelerSecureId' => '',
'cc_exp_month' => $m,
'selected_cc_exp_month' => $m,
'cc_exp_year' => $y,
'selected_cc_exp_year' => $y,
'cc_cvv2' => $cvv2,
'qiwi_phonenumber' => '',
'netswipe_cardholder' => ''
)))
);
$res = curl_exec($ch);
$info = [];
$info['status'] = preg_match('/success\.php/', $res) ? 'SUCCESS' : 'ERROR';
if($info['status'] == 'SUCCESS') echo 'OK';
else
echo $res;
@unlink($tmpcook);