stripe/braintree - help a brother out

Joined
12 Feb 2006
Posts
17,239
Location
Surrey
i've been struggling with this for the past week. i actually attempted it a year ago and got no where so put it on the todo list, but i'm currently trying again with no real progress for the time it's taken.

i've been at it with stripe for the most part, trying to get this set up with a nice form, but i'm finding a straight forward guide that applies to my site with no framework impossible to locate.

can someone please help me out.

is it possible to have something like stripe, or preferably braintree (as i hear better things about it) added to a site that has no shopping cart, no wordpress, no framework etc? it's just a custom made site that i want to add a payment section to on a standard form

i've made some improvement to this page that are only local, but essentially it's the link below where there would be a payment form included. the user would have been given a price before visiting this page with a quote ref, which knows the total amount and would be able to be fed to the payment form.

https://www.mayercleaning.co.uk/book-online/cleaning/?service=moving

is this doable? if so, any suggestions as to a simple guide that works for me? everyone i try, like the following link, acts as though you're all set by showing you a small bit of code, but leaves out that it's for some framework and i've just wasted half a day figuring that out.

https://codepen.io/rcdexta/pen/eZPbzB
 
Soldato
OP
Joined
12 Feb 2006
Posts
17,239
Location
Surrey
no more or less than any other wordpress/cart style site i guess. i feel we've got some basic good security, but always open to improving.

i was under the impression the great thing about these services is that they are secure, that they deal with all the details and security of the input fields etc
 
Soldato
OP
Joined
12 Feb 2006
Posts
17,239
Location
Surrey
https://braintree.github.io/braintree-web-drop-in/

Viewing the source for that page might help you a bit.

it doesn't as there's still code missing.

the official documentation seems unneccesarily complex, but then any guide there is skips steps.

it's odd as usually i'd expect to find someone with a guide, but also with the files to download, then you just copy paste the bits into the correct place, editing the id and keys, and done.

but not with braintree it seems
 
Soldato
OP
Joined
12 Feb 2006
Posts
17,239
Location
Surrey
i'm trying to make some progress with this.

i have the drop in UI now working, and when you enter card details, it'll come back with a nonce and a load of other details

what i'm struggling to figure out is how to get that information so that it can be used/stored.

at the moment this is what's given back .

Code:
{
  "nonce": "tokencc_bh_12324_65645645_94554456_r5prjt_236",
  "details": {
    "cardType": "Visa",
    "lastFour": "4242",
    "lastTwo": "42"
  },
  "type": "CreditCard",
  "description": "ending in 42",
  "binData": {
    "prepaid": "Unknown",
    "healthcare": "Unknown",
    "debit": "Unknown",
    "durbinRegulated": "Unknown",
    "commercial": "Unknown",
    "payroll": "Unknown",
    "issuingBank": "Unknown",
    "countryOfIssuance": "Unknown",
    "productId": "Unknown"
  }
}

this is currently in <pre> for easy reading, though i can easily change this to be inside whatever, the information for me isn't usable as it's just one big bit of text.

Any suggestions?
 
Back
Top Bottom