Created
September 22, 2021 12:26
-
-
Save manuchap/8ca0b5c750573b68a4b59abbfe20f05a to your computer and use it in GitHub Desktop.
Ajax windcave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Request (POST https://webhook.site/45d4ae25-efd0-49ae-b468-a813a2a6005c) | |
jQuery.ajax({ | |
url: "https://webhook.site/45d4ae25-efd0-49ae-b468-a813a2a6005c", | |
type: "POST", | |
headers: { | |
"Cookie": "laravel_session=fDXXvuqwdxxmfrqP0vLDPMaeP0w1lvpl0YE7wyvR", | |
"Authorization": "Basic Og==", | |
"Content-Type": "application/json", | |
}, | |
contentType: "application/json", | |
data: JSON.stringify({ | |
"installmentCount": 5, | |
"amountSurcharge": "1.50", | |
"metaData": [ | |
], | |
"avs": { | |
"avsAction": 0, | |
"postCode": "AB10 1AA", | |
"streetAddress": "1 islington lane" | |
}, | |
"customer": { | |
"phoneNumber": "+6421384236", | |
"account": "9999999999999999", | |
"firstName": "John", | |
"shipping": { | |
"phoneNumber": "+43543435", | |
"city": "deliverytown", | |
"address1": "15 elsewhere lane", | |
"postalCode": "90210", | |
"state": "", | |
"countryCode": "NZ", | |
"address3": "", | |
"name": "JOHN TT DOE", | |
"address2": "" | |
}, | |
"billing": { | |
"phoneNumber": "+43543435", | |
"city": "deliverytown", | |
"address1": "15 elsewhere lane", | |
"postalCode": "90210", | |
"state": "", | |
"countryCode": "NZ", | |
"address3": "", | |
"name": "JOHN TT DOE", | |
"address2": "" | |
}, | |
"email": "john.doe@hosting.com", | |
"lastName": "Doe" | |
}, | |
"amount": "12345.00", | |
"storedCardIndicator": "single", | |
"storeCard": true, | |
"installmentNumber": 1, | |
"notificationUrl": "https://mybiz.com/txn_result?123", | |
"type": "purchase", | |
"browser": { | |
"userAgent": "Mozilla/5.0 Windows NT 10.0; Win64; x64; rv:59.0 Gecko/20100101 Firefox/59.0", | |
"ipAddress": "123.123.123.123" | |
}, | |
"card": { | |
"cardHolderName": "JOHN T DOE", | |
"dateExpiryMonth": "01", | |
"dateExpiryYear": "18", | |
"cvc2": "111", | |
"cardNumber": "4111111111111111" | |
}, | |
"debtRepaymentIndicator": 0, | |
"merchantReference": "1234ABC", | |
"currency": "NZD" | |
}) | |
}) | |
.done(function(data, textStatus, jqXHR) { | |
console.log("HTTP Request Succeeded: " + jqXHR.status); | |
console.log(data); | |
}) | |
.fail(function(jqXHR, textStatus, errorThrown) { | |
console.log("HTTP Request Failed"); | |
}) | |
.always(function() { | |
/* ... */ | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment