fork download
  1. <?php
  2.  
  3. // 🔹 Card Details Variables
  4. $cc = "5156769272615361"; // Card Number
  5. $month = "02"; // Expiration Month
  6. $year = "2028"; // Expiration Year
  7. $cvv = "488"; // CVV
  8.  
  9. // 🔹 Pehla Request (Card Tokenization)
  10. $first_url = "https://p...content-available-to-author-only...i.com/graphql";
  11.  
  12. $first_headers = [
  13. "accept: */*",
  14. "accept-language: en,en-US;q=0.9,hi;q=0.8",
  15. "authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtp...",
  16. "braintree-version: 2018-05-10",
  17. "content-type: application/json",
  18. "origin: https://a...content-available-to-author-only...y.com",
  19. "referer: https://a...content-available-to-author-only...y.com/",
  20. "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
  21. ];
  22.  
  23. $first_data = json_encode([
  24. "clientSdkMetadata" => [
  25. "source" => "client",
  26. "integration" => "custom",
  27. "sessionId" => "1e1c7fda-d692-4e69-afc2-5a7d64aae8af"
  28. ],
  29. "query" => "mutation TokenizeCreditCard(\$input: TokenizeCreditCardInput!) {
  30. tokenizeCreditCard(input: \$input) {
  31. token
  32. creditCard {
  33. bin
  34. brandCode
  35. last4
  36. expirationMonth
  37. expirationYear
  38. binData {
  39. prepaid
  40. healthcare
  41. debit
  42. durbinRegulated
  43. commercial
  44. payroll
  45. issuingBank
  46. countryOfIssuance
  47. productId
  48. }
  49. }
  50. }
  51. }",
  52. "variables" => [
  53. "input" => [
  54. "creditCard" => [
  55. "number" => $cc,
  56. "expirationMonth" => $month,
  57. "expirationYear" => $year,
  58. "cvv" => $cvv
  59. ],
  60. "options" => [
  61. "validate" => false
  62. ]
  63. ]
  64. ],
  65. "operationName" => "TokenizeCreditCard"
  66. ]);
  67.  
  68. $ch = curl_init();
  69. curl_setopt($ch, CURLOPT_URL, $first_url);
  70. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  71. curl_setopt($ch, CURLOPT_POST, 1);
  72. curl_setopt($ch, CURLOPT_HTTPHEADER, $first_headers);
  73. curl_setopt($ch, CURLOPT_POSTFIELDS, $first_data);
  74. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  75.  
  76. $first_response = curl_exec($ch);
  77. $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  78. $error = curl_error($ch);
  79.  
  80. if ($error) {
  81. echo "❌ First Request Error: " . $error;
  82. }
  83.  
  84. // 🔹 Dusra Request (Payment Method Page Capture)
  85. $second_url = "https://w...content-available-to-author-only...o.uk/my-account/add-payment-method/";
  86.  
  87. $second_headers = [
  88. "User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36",
  89. "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
  90. "Accept-Encoding: gzip, deflate, br, zstd",
  91. "cache-control: max-age=0",
  92. "upgrade-insecure-requests: 1",
  93. "sec-fetch-site: same-origin",
  94. "sec-fetch-mode: navigate",
  95. "sec-fetch-user: ?1",
  96. "sec-fetch-dest: document",
  97. "sec-ch-ua: \"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not_A Brand\";v=\"24\"",
  98. "sec-ch-ua-mobile: ?1",
  99. "sec-ch-ua-platform: \"Android\"",
  100. "save-data: on",
  101. "referer: https://w...content-available-to-author-only...o.uk/my-account/add-payment-method/",
  102. "accept-language: en,en-US;q=0.9,hi;q=0.8",
  103. "priority: u=0, i",
  104. "Cookie: woocommerce_current_currency=GBP; __stripe_mid=1e5d6b5b-7167-4c2a-9427-58cd69372065ce25e1; __stripe_sid=54a90c7f-1569-4a6a-8ad4-88f57e3a22afa7ceb1; wordpress_logged_in_f9aab48a6c2081ab1ed041c553ba2d31=saravanydbbdbdbddgdhhddhsdadav6359%7C1741764442%7CTSKZi5GNdhp8HY5sCBomuiRHuHHmHokZkRTWm4q1Bj7%7C35c828a8d3c82ed7b50655a667942cbf4c2b5b6cb09523ef8ee53b3ef63b6164"
  105. ];
  106.  
  107. $ch = curl_init();
  108. curl_setopt($ch, CURLOPT_URL, $second_url);
  109. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  110. curl_setopt($ch, CURLOPT_HTTPHEADER, $second_headers);
  111. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  112.  
  113. $second_response = curl_exec($ch);
  114. $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  115. $error = curl_error($ch);
  116.  
  117. if ($error) {
  118. echo "❌ Second Request Error: " . $error;
  119. }
  120.  
  121. // 🔹 Final Output
  122. echo "✅ First Response:\n" . $first_response . "\n\n";
  123. echo "✅ Second Response:\n" . $second_response . "\n";
  124.  
  125. ?>
Success #stdin #stdout 0.03s 26412KB
stdin
Standard input is empty
stdout
❌ First Request Error: Could not resolve host: payments.braintree-api.com