Skip to content
View bigboss978's full-sized avatar

Block or report bigboss978

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
bigboss978/README.md6a1faaf3f55788f170f98e64b82db28ff2fad683c115cec431854cd736245709
- 👋 Hi, I’m @bigboss978
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...

<!---
bigboss978/bigboss978 is a ✨ special ✨ repository because its `README.md` (this file) appears on your GitHub profile.
You can click the Preview link to take a look at your changes.
--->
var gateway = new braintree.BraintreeGateway({
  accessToken: useYourAccessToken
});

var saleRequest = {
  amount: req.body.amount,
  merchantAccountId: "USD",
  paymentMethodNonce: req.body.nonce,
  deviceData: req.body.device_data,
  orderId: "Mapped to PayPal Invoice Number",
  descriptor: {
    name: "Descriptor displayed in customer CC statements. 22 char max"
  },
  shipping: {
    firstName: "Jen",
    lastName: "Smith",
    company: "Braintree",
    streetAddress: "1 E 1st St",
    extendedAddress: "5th Floor",
    locality: "Bartlett",
    region: "IL",
    postalCode: "60103",
    countryCodeAlpha2: "US"
  },
  options: {
    paypal: {
      customField: "PayPal custom field",
      description: "Description for PayPal email receipt"
    },
    submitForSettlement: true
  }
};

gateway.transaction.sale(saleRequest, function (err, result) {
  if (err) {
    res.send("<h1>Error:  " + err + "</h1>");
  } else if (result.success) {
    res.send("<h1>Success! Transaction ID: " + result.transaction.id + "</h1>");
  } else {
    res.send("<h1>Error:  " + result.message + "</h1>");
  }
});app.get("/client_token", function (req, res) {
  gateway.clientToken.generate({}, function (err, response) {
    res.send(response.clientToken);
  });
});

Popular repositories Loading

  1. bigboss978 bigboss978 Public

    Config files for my GitHub profile.