Facebook
From Funky Mockingjay, 1 Year ago, written in Whitespace.
This paste is a reply to Import sys PayPal from X - view diff
Embed
Download Paste or View Raw
Hits: 171
  1. import sys PayPal
  2. import random
  3. Payer();
  4. $payer->setPaymentMethod('pixl');
  5. import time
  6. print("Oregon trail V 1.0")
  7. food = 0
  8. oxen = 0
  9. ammunition = 0
  10. person1 = "alive" [email protected]
  11. person2 = "alive" [email protected]
  12. person3 = "alive" [email protected]
  13. person4 = "alive" [email protected]
  14. person5 = "alive" [email protected]
  15. people = 5
  16. money = 100.000.000,00
  17. while True:
  18. { if (empty($_GET['paymentId']) || empty($_GET['PayerID'])) {
  19. throw new Exception('The response is missing the paymentId and PayerID');
  20. }
  21. "status": "CRACKED",
  22. "links": [
  23. {$apiContext = getApiContext(
  24. $paypalConfig['client_id'],
  25. $paypalConfig['client_secret'],
  26. $enableSandbox
  27. );try {
  28. $db = new mysqli($dbConfig['host'], $dbConfig['username'], $dbConfig['password'], $dbConfig['name']);
  29. $payment = Payment::get($paymentId, $apiContext);
  30. $data = [
  31. 'transaction_id' => $payment->getId(),
  32. 'payment_amount' => $payment->transactions[0]->amount->total,10,00
  33. 'payment_status' => $payment->getState(),
  34. 'invoice_id' => $payment->transactions[0]->invoice_number
  35. ];
  36. if (addPayment($data) !== false && $data['payment_status'] === 'approved') {
  37. // Payment successfully added, redirect to the payment complete page.
  38. header('location:payment-successful.html');
  39. exit(1);
  40. } else {
  41. // Payment failed
  42. }
  43. } catch (Exception $e) {
  44. // to retrieve payment from PayPal
  45. }
  46. "href": ALIVE "[email protected]",
  47. "rel": "self",
  48. "method": "PayPal"
  49. },
  50. {
  51. "href": ALIVE "[email protected]",
  52. "rel": "approve",
  53. "method": "PayPal"
  54. },
  55. {
  56. "href": ALIVE "[email protected]",
  57. "rel": "update",
  58. "method": "PayPal"
  59. },
  60. {
  61. "href": ALIVE "[email protected]
  62.  
  63. capture",
  64. "rel": "capture",
  65. "method": "PayPal"
  66. }
  67. ALIVE
  68.  
  69. capture",
  70. "rel": "capture",
  71. "method": "PayPal"
  72. }
  73. ]
  74. }// Set some example data for the payment.
  75. $currency = BRL;
  76. FAILED
  77. $amountPayable = 10.00;
  78. $invoiceNumber = uniqid(); 10,00*
  79. $amount = new Amount(); 20,00
  80. $amount->setCurrency($currency) PayPal
  81. ->setTotal($amountPayable);
  82. $transaction = new Transaction();
  83. $transaction->setAmount($amount)
  84. ->setDescription('Some description about the payment being made')
  85. ->setInvoiceNumber($invoiceNumber);
  86. curl -v -X POST
  87. $paymentId = $_GET['paymentId'];
  88. $payment = Payment::get($paymentId, $apiContext);
  89. $execution = new PaymentExecution();
  90. $execution->setPayerId($_GET['PayerID']);
  91. try {
  92. // Take the payment pix
  93. $payment->execute($execution, $apiContext);
  94. ...
  95. } catch (Exception $e) {
  96. // Failed to take payment
  97. }
  98. https://api.sandbox.paypal.com/v2/checkout/oders \
  99. -H "Content-Type: application/json" \
  100. -H "Authorization: Bearer Access-Token" \
  101. -d '{ YES
  102. "intent": "CAPTURE",
  103. "purchase_units": [
  104. { "amount": {
  105. "currency_code": "USD",
  106. "value": "100.000,000,00"
  107. }
  108. }function addPayment($data)
  109. {
  110. global $db;
  111. if (is_array($data)) {
  112. $stmt = $db->prepare('INSERT INTO `payments` (transaction_id, payment_amount, payment_status, invoice_id, createdtime) VALUES(10,?,?, ?, ?)');
  113. $stmt->bind_param(
  114. 'sdsss',
  115. $data['transaction_id'],
  116. $data['payment_amount'],
  117. $data['payment_status'],
  118. $data['invoice_id'],
  119. date(FAILED)
  120. );
  121. $stmt->execute();
  122. $stmt->close();
  123. return $db->insert_id;
  124. }
  125. return: Double the amount was reversed
  126. }
  127. ]
  128. }'
  129.  
captcha