jamie61880
Engaged
jamie61880
Engaged
Activity
‎May 11, 2023
09:12 AM
This actually works the best because I don't have to specify a certain number of digits after the C: And Part_Number Like '[C][0-9]%'
... View more
‎May 11, 2023
09:02 AM
Yes, we're on Microsoft SQL Server. This code does not work: 'b[0-9][0-9][0-9][0-9]|c[1-3][0-9][0-6][4-8][0-9][1-7]' Was this to capture all the digits? It does work like this: And (Part_Number LIKE 'C[0-9][0-9][0-9][0-9]' Or Part_Number LIKE 'C[0-9][0-9][0-9][0-9][0-9]')
... View more
‎May 10, 2023
02:03 PM
Thank you! This worked, but I had to remove the "R" before the Like in your code above. Some part numbers have 4 digits and some have 5 or maybe even more than that. Do I have to do an Or statement for all these different variations with how many digits might be in the part number? I did this and it works, but what if we have a part number that has 10 digits in it and I don't have that in the where statement? It won't display that then. Also, I'm not sure what database brand I have. How do I tell if I'm using SQL or MySQL?
... View more
‎May 10, 2023
09:49 AM
I have a search results page that lists part numbers that engineers have to work on, but I only want part numbers displayed on the results page that have a C and then a number after the C in the part number. How do I write this in the Where statement in my CFQuery? If I write Where Part_Number Like 'C%', it lists all the parts that have anything after a C in the part number like CBT-BGA. I want it to find only part numbers like this: C4560. I also tried this: Where Part_Number Like '^C[0-9]', but this doesn't show any results. Thanks for your help.
... View more
‎Dec 12, 2016
03:14 PM
BKBK, The first 2 lines above worked great! Yes, it was just from the typing error with the quotes. Thank you very much! I really appreciate it. Andy
... View more
‎Dec 09, 2016
08:26 AM
BKBK, Yes, this works too: <cfif refindnocase("^[cC][0-9]{4}", "form.Part_Number#id#") GT 0>. Just had to remove the [] and put a dot after form. But I'm still having an issue with the If statement not outputting "Yes!!!". Even if I try and with an exact part number, the If statement still outputs "No!!!". Here's what I tried: <cfif "form.Part_Number#id#" IS 'P15552A'> YES!!! <cfelse> NO!!!</cfif> I'm guessing it has to do something with the #id#. I do have this also for where the id comes from: <cfloop index="id" list="#form.listofids#" delimiters=","> I really don't remember why we needed this id, but I think it was because of the way our database was set up. Do you have any ideas as to how to even get the If Statement above to output "Yes!!!"? If that works, then I could incorporate the refindnocase code. Andy
... View more
‎Dec 08, 2016
12:54 PM
BKBK, I was able to get a little different code to work that is below, but it only works on the first page that displays the info. to update, but I'm having a problem with it on the page after the Update button is clicked. That's where I want to send the email out from. This code should work from the part number field from the form on the page before, correct? For right now, I am just trying to get a "Yes!!!" to display in the table on the page after the Update button is clicked if the part number is a C Number. If not, display "No!!!". The form.Part_Number#id# I think is written like this because of how our query is set up. But when I use the code below, the only thing that displays is "No!!!". Some of the part numbers that are displaying are C Numbers, so I'm not sure why they are not saying "Yes!!!", especially if it's working on the page before. The only difference is the output tags. What am I doing wrong? <td width="auto"> <cfif left("form.Part_Number#id#",1) EQ "C" AND refindnocase("^[cC][0-9]", "form.Part_Number#id#")> YES!!! <cfelse> NO!!!</cfif> </td> Thanks. Andy
... View more
‎Dec 05, 2016
02:14 PM
Hi. I am trying to create a CFIF statement to search for part of our part numbers. For instance, we have part numbers like C1000 or C1300, etc. We also have part numbers like SG-BGA-6000 or PC-PLCC-2000. What I would like the If statement to do, is to tell me if there are any C Numbers, then send an email. How do you create an If Statement for part numbers that begin with C and have numbers after it? Thanks for anyone's help. Andy
... View more
‎Aug 16, 2016
10:18 AM
No, I haven't yet. I'm just wondering how to even get this started. How do you accrue hours on a daily basis? What's the best way to set this up? Do I create a table that adds every day to it with the accrual rate, such as 0.1, or do I just output the number depending on what the first date was when I set this up?
... View more
‎Aug 16, 2016
09:56 AM
Hi. I am trying to set up a vacation schedule in ColdFusion. I'm just wondering how to do this. Where do I start? I will need it to accrue so many hours each day and then subtract the hours the employee uses. When the employee logs in each day, they'll be able to see how many hours they have accrued. Can someone show me how to get this started? Thanks. Andy
... View more
‎Jun 09, 2016
12:50 PM
Thanks!. I appreciate the help. I love how you referred to Explorer as Exploder! That's so true.
... View more
‎Jun 09, 2016
12:33 PM
Wolfshade, I was able to put the products in hidden fields in a form on my checkout page like this: <cfoutput> <cfloop index="i" from="1" to="#arrayLen(Session.ElastomerCart.Products)#"> <input type="hidden" value="#Session.ElastomerCart.Products[2]#"> <input type="hidden" value="#Session.ElastomerCart.Products[3]#"> <input type="hidden" value="#Session.ElastomerCart.Products[4]#"> <input type="hidden" value="#Session.ElastomerCart.Products[5]#"> <input type="hidden" value="#LSNumberFormat(Session.ElastomerCart.Products[6], "$_.__")#"> <input type="hidden" value="#LSNumberFormat(Session.ElastomerCart.Products[7], "$_.__")#"> </cfloop> </cfoutput> I don't know how to use AJaX. Then when this form gets submitted to the Confirmation page, I output the product info. into a cfsavecontent tag like this: <cfsavecontent variable="mvar">. I found this online before I noticed you wrote me back. Then I output this into the cfmail tag like this: #mvar#. Is this not a very efficient way of doing this? I also put the css styles inside of the cfmail tag and that works. The only thing that doesn't work in the email is the rounded corners I have on my table. It does work if I email it to my yahoo email, but they don't work in Outlook. I found this: HTML email buttons that work · GitHub , but I wasn't exactly sure how to incorporate this into my code to get the rounded corners on the table. I also wasn't sure if the code that is grayed out was only for Outlook. Do you know of another way to make a table have rounded corners inside of cmail? Andy
... View more
‎Jun 09, 2016
06:57 AM
WolfShade, I put this on my cart page: <form action="../elastomer.cfm" method="post"> <input type="submit" class="submit" name="ClearCart" value="Clear Cart"> </form> And this back on my beginning elastomer.cfm page: <cfif StructKeyExists(form,'ClearCart')> <cfset StructDelete(session,'ElastomerCart')> </cfif> This works to clear the cart, but still allows me to enter the info. into the database. If I wanted to pass the Products variable into an email to display the product info. that gets sent to our company and the customer letting each of us know what they ordered, how do I do that? I've only passed info. from a form into an email before, but not session variables. Is there a way to have my css styles also work in an email? Andy
... View more
‎Jun 06, 2016
01:06 PM
Hi. I have some session variables for a shopping cart page. I want to set up a button for the user to click to clear the cart. How do I do this? I tried using the StructDelete function, inside a form with a button, but even if I don't click on this and I just click on the Checkout page button instead, it clears the cart before the info. can be inserted into the database on the confirmation page. How do I set this up so that the cart only gets cleared if the button is clicked? Here is what I have: <cfif NOT StructKeyExists(session,'ElastomerCart')> <cfset Session.ElastomerCart = StructNew()> <cfset Session.ElastomerCart.First_Name = ""> <cfset Session.ElastomerCart.Last_Name = ""> <cfset Session.ElastomerCart.Title = ""> <cfset Session.ElastomerCart.Company = ""> <cfset Session.ElastomerCart.Address1 = ""> <cfset Session.ElastomerCart.Address2 = ""> <cfset Session.ElastomerCart.City = ""> <cfset Session.ElastomerCart.State = ""> <cfset Session.ElastomerCart.Zip = ""> <cfset Session.ElastomerCart.Country = ""> <cfset Session.ElastomerCart.Phone = ""> <cfset Session.ElastomerCart.Fax = ""> <cfset Session.ElastomerCart.Email = ""> <cfset Session.ElastomerCart.Products = ArrayNew(2)> </cfif> <cfif StructKeyExists(session,'ElastomerCart')> <form action="ElastomerCart.cfm" method="post"> <cfset StructDelete(session,'ElastomerCart')> <input type="submit" class="submit" value="Clear Cart"> </form> </cfif> Thanks. Andy
... View more
‎May 18, 2016
01:11 PM
BKBK, Where do you put this line of code: <cfloop index="i" for="1" to="12"> <cfset currentFieldName = "productQuantity" & i> <cfinput type="text" name="#currentFieldName#"> </cfloop> I was receiving an error that said there was an Attribute validation error for tag CFLOOP. The Valid Attributes are: ARRAY,CHARACTERS,CHARSET,COLLECTION,CONDITION,DELIMITERS,ENDROW,FILE,FROM,GROUP,GROUPCASESENSITIVE,INDEX,ITEM,LIST,QUERY,STARTROW,STEP,TO so I changed the For to From, and it went through, but it's still not working. Where do I put this loop? Above the CFOUTPUT, or inside the Form, or inside the IF isDefined("form.submit") line? I get different results where I put it. Does the text box you wrote in the code above, replace the text box I have? Or do I still need the IF isDefined("form.submit") statement and just use the text box you wrote above in this IF statement? This is how I currently have everything: <cfoutput> <cfform name="ShoppingCart" action="ShoppingCart.cfm" method="post"> You have #arrayLen(Session.ShoppingCart.Products)# items in your cart.<br /><br /> <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#"> <table> <tr> <td>#Session.ShoppingCart.Products[2]#</td> <cfif isDefined("Form.submit")> <cfloop index="i" from="1" to="12"> <cfset currentFieldName = "productQuantity" & i> </cfloop> <cfinput type="text" name="#currentFieldName#" value="#currentFieldName#"> <cfelse> <td><cfinput type="text" name="productQuantity" value="#Session.ShoppingCart.Products[3]#"></td> </cfif> <td><a href="ShoppingCart.cfm?deleteID=#i#">Delete</a></td> <td><input type="submit" name="submit" value="submit"></td> </tr> </table> </cfloop> </cfform> </cfoutput> When I run this though, it just outputs "productQuantity12" into each text box. If I change the CFLOOP to this: <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#">, it outputs "productQuantity8" into each text box since there are 8 items in my cart currently. The text box you wrote above did not have any value, so I was not able to see anything in the text box, so I added this: value="#currentFieldName#" What am I still doing wrong? Do I need to use this code at all? If so, how? <cfif StructKeyExists(url,'editID')> <cfset Session.ShoppingCart.Products[form.editID][1] = form.productID> <cfset Session.ShoppingCart.Products[form.editID][2] = form.productName> <cfset Session.ShoppingCart.Products[form.editID][3] = form.productQuantity> </cfif> Andy
... View more
‎May 17, 2016
07:43 AM
BKBK, Just removing the readonly attribute doesn't do anything. It doesn't update the text box after I change the quantity and click the Submit button. I did find this: <cfif isDefined("Form.submit")> <td>Quantity: <cfinput type="text" name="productQuantity" value="#productQuantity#"></td> <cfelse> <td><cfinput type="text" name="productQuantity" value="#Session.ShoppingCart.Products[3]#"></td> </cfif> One problem with this is after I click the Submit button when I have 12 items in the cart, this gets displayed in the text box for each line item: 1,1,1,1,1,1,1,1,1,9,1,1. 9 is the one I updated. How do I get this narrowed down to only having the one text box for the item I updated, display correctly. So that 9 is updated on Item 10 and the 1's are updated on all the other text boxes? Here's what I have for this whole output of code: <cfoutput> <cfform name="ShoppingCart" action="ShoppingCart.cfm" method="post"> You have #arrayLen(Session.ShoppingCart.Products)# items in your cart.<br /><br /> <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#"> <table> <tr> <td>#Session.ShoppingCart.Products[2]#</td> <cfif isDefined("Form.submit")> <td>Quantity: <cfinput type="text" name="productQuantity" value="#productQuantity#"></td> <cfelse> <td><cfinput type="text" name="productQuantity" value="#Session.ShoppingCart.Products[3]#"></td> </cfif> <td><a href="ShoppingCart.cfm?deleteID=#i#">Delete</a></td> <td><input type="submit" name="submit" value="submit"></td> </tr> </table> </cfloop> </cfform> </cfoutput> Someone gave me this code for editing a shopping cart, but didn't show me how to use it. Do you know how to use this section otherwise?: <cfif StructKeyExists(url,'editID')> <cfset Session.ShoppingCart.Products[form.editID][1] = form.productID> <cfset Session.ShoppingCart.Products[form.editID][2] = form.productName> <cfset Session.ShoppingCart.Products[form.editID][3] = form.productQuantity> </cfif> Thanks. Andy
... View more
‎May 16, 2016
02:09 PM
BKBK, Thank you! I finally got it to work correctly! I changed Price to Quantity, so the user could update the Quantity they want. How do you set up an Edit box for Quantity? I have this that puts the Quantity into a text box, but how do you update it so it updates the number the user could type in?: <cfif StructKeyExists(url,'editID')> <cfset Session.ShoppingCart.Products[form.editID][1] = form.productID> <cfset Session.ShoppingCart.Products[form.editID][2] = form.productName> <cfset Session.ShoppingCart.Products[form.editID][3] = form.productQuantity> </cfif> <td><cfinput type="text" name="#Session.ShoppingCart.Products[3]#" value="#Session.ShoppingCart.Products[3]#" passThrough = "readonly = 'True'"></td> I've only ever updated a database, but not a session before. Andy
... View more
‎May 16, 2016
09:52 AM
This is line 46: <td>#Session.ShoppingCart.Products[2][3]#</td> I have this at the top of the shopping cart page: <cfif NOT StructKeyExists(session,'ShoppingCart')> <cfset Session.ShoppingCart = StructNew()> <cfset Session.ShoppingCart.FirstName = ""> <cfset Session.ShoppingCart.LastName = ""> <cfset Session.ShoppingCart.Address = ""> <cfset Session.ShoppingCart.Products = ArrayNew(2)> </cfif> I tried changing the ArrayNew(2) to a 3, but that didn't work either.Or does that not need to be changed? I don't understand why I can't get the price to output? I did everything same way as the ProductName.
... View more
‎May 16, 2016
07:44 AM
BKBK, How do I display the price? I have the code below that outputs the ProductName with the [2], but the price doesn't output. I added the Price with [3] like you did above, but if I put this into the code below, I receive a 500 internal server error, that says: "Error","ajp-bio-8014-exec-11","05/16/16","09:34:04","MySite","You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. The specific sequence of files included or processed is: D:\websites\Ironwoodelectronics\Sessions\Ben\ShoppingCart.cfm, line: 46 " coldfusion.runtime.ScopeCastException: You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. What does this error mean? <cfoutput> You have #arrayLen(Session.ShoppingCart.Products)# items in your cart.<br /><br /> <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#"> <table> <tr> <td>#Session.ShoppingCart.Products[2][3]#</td> <td><a href="ShoppingCart.cfm?deleteID=#i#">Delete</a></td> </tr> </table> </cfloop> </cfoutput> Andy
... View more
‎May 13, 2016
11:55 AM
Hi everyone. I was able to get a very simple shopping cart set up and to work with adding a Product to the cart and deleting the Product, but how do I add or display something such as the price of the product too? Here's what I have below on a products.cfm page and a ShoppingCart.cfm page: products.cfm <form action="ShoppingCart.cfm" method="post"> Product 1 Description <input type="hidden" name="productID" value="1" /> <input type="hidden" name="productName" value="Socket" /> <input type="submit" value="Add To Cart" /> </form> <form action="ShoppingCart.cfm" method="post"> Product 2 Description <input type="hidden" name="productID" value="2" /> <input type="hidden" name="productName" value="Adapter" /> <input type="submit" value="Add To Cart" /> </form> ShoppingCart.cfm <cfif NOT StructKeyExists(session,'ShoppingCart')> <cfset Session.ShoppingCart = StructNew()> <cfset Session.ShoppingCart.FirstName = ""> <cfset Session.ShoppingCart.LastName = ""> <cfset Session.ShoppingCart.Address = ""> <cfset Session.ShoppingCart.Products = ArrayNew(2)> </cfif> <cfif StructKeyExists(form,'productID')> <cfset Session.ShoppingCart.Products[arraylen(Session.ShoppingCart.Products)+1][1] = form.productID> <cfset Session.ShoppingCart.Products[arraylen(Session.ShoppingCart.Products)][2] = form.productName> </cfif> <cfif StructKeyExists(url,'deleteID')> <cfset variables.products = ArrayNew(2)> <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#"> <cfif url.deleteID NEQ i> <cfset variables.products[arraylen(variables.products)+1][1] = Session.ShoppingCart.Products[1]> <cfset variables.products[arraylen(variables.products)][2] = Session.ShoppingCart.Products[2]> </cfif> </cfloop> <cfset Session.ShoppingCart.Products = variables.products> </cfif> <cfif StructKeyExists(url,'editID')> <cfset Session.ShoppingCart.Products[form.editID][1] = form.productID> <cfset Session.ShoppingCart.Products[form.editID][2] = form.productName> </cfif> <cfoutput> You have #arrayLen(Session.ShoppingCart.Products)# items in your cart.<br /><br /> <cfloop index="i" from="1" to="#arrayLen(Session.ShoppingCart.Products)#"> <table> <tr> <td>#Session.ShoppingCart.Products[2]#</td> <td><a href="ShoppingCart.cfm?deleteID=#i#">Delete</a></td> </tr> </table> </cfloop> </cfoutput> <br /> <form action="shopping.cfm" method="POST"> <div class="form-row"> <label> <span>First Name</span> <input type="text" size="20" name="FirstName"> </label> </div> <div class="form-row"> <label> <span>Last Name</span> <input type="text" size="20" name="LastName"> </label> </div> <div class="form-row"> <label> <span>Address</span> <input type="text" size="20" name="Address"> </label> </div> <input type="submit" class="submit" value="Check Out"> </form> Thanks for your help. Andy
... View more
‎Apr 29, 2016
07:52 AM
Basically, A customer chooses that they want Product 1 and the price is $10.00. I want them to click a button that Adds the item to a shopping cart. Then if they want to continue to choose other products, they can add those items to the shopping cart also. So if they choose Product 2 and the price is $20.00, they click Add to Cart, the Cart total will show $30.00. Then they'll have the option to add more quantities or remove each product that is in their cart. Then later, I will set up a Checkout with Stripe.com that will handle the credit cart information. I need to set up a shopping cart this way because I have a page that is calculating the prices for parts on the fly, so I wouldn't be able to use anything like a CFWebstore or CartWeaver or anything like that since I don't have a database of parts to just output. If you want to see the page I have created, it's located here: Shin-Etsu Polymer Elastomer cut to size Just choose a part number and type in 10 for the Xmm and 10 for the Ymm. You'll notice that after you click one part number and fill in the info. and click update, and then click on a different part number, the table disappears for the first part you chose. I just have a Place Order button at the bottom after you click update that just opens up a pop up screen to call us for now. Can you show me how to get this to work so that if the customer wants to add the first part to shopping cart, they can and then continue ordering other parts? I'm pretty sure I need to use session variables to get this to work, correct? Some of the web sites I've been reading say to use Arrays and Structures too, but I don't understand how to use these. Thanks. Andy
... View more
‎Apr 29, 2016
07:28 AM
Hi. I am trying to understand how to use a very simple shopping cart in Cold Fusion, but am having a hard time. I've tried looking at information on web sites, but they all use a script like this below that fills in the info. into a cart. <cfscript> CartItems=4; Cart = ArrayNew(1); for ( i=1; i LE cartItems; i=i+1) { Cart=StructNew(); Cart.ID=i; Cart.Name="Product " & i; Cart.SKU=i*100+(2*i*10)+(3*i); Cart.Qty=3*i-2; } </cfscript> I would rather use my own form that outputs info. into a table to display to the user and this table could be used as a shopping cart. I've created this very simple form below. Can someone please show me an example of how to make this form into a shopping cart so I can add, update, and delete the items in it? Thank you. Andy
... View more
‎Apr 27, 2016
12:59 PM
Yes, I did right click, but Properties is not in the list of options to choose from. We do have IIS 8.5, so maybe that is why the instructions are out of date.
... View more
‎Apr 27, 2016
12:10 PM
WolfShade, I saw this too, but I got stuck because when I click on the Default Web Site or even our own site, there is no option for permissions to click on, so I didn't know where to go from there. I'm not sure if these directions are on an older version of iis or what. Andy
... View more
‎Apr 27, 2016
11:14 AM
Hi everyone. I am testing some simple code on this page: Untitled Document to do an online order with Stripe.com, but I keep getting this error message when I click Submit: 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Does anyone know what to do to get this to work? Do I need to update something in the CF11 administrator pages or do I need to update something in our IIS server? Andy
... View more
‎Apr 20, 2016
01:46 PM
Hi everyone. I just have a few questions about setting up an ecommerce site. What are the differences between CFWebstore, Cartweaver, and stripe.com? Does CFWebstore and Cartweaver just set up a shopping cart on your site? Or do they handle payments with credit cards too? Or is that where stripe.com comes into play? You set up your pages with a shopping cart with CFWebstore or Cartweaver and then to actually process the credit card, you would have to go through stripe.com? I have this page: https://www.ironwoodelectronics.com/elastomer.cfm?CFID=1075132&CFTOKEN=f32b97bb35145429-0659E32C-9C8E-9968-3D20B2208EDF00CB If you click on one of the radio buttons and type in something like 10 for the Xmm and 10 for the Ymm boxes and click Update, a table is displayed with what the part costs. Part info. is not being stored in any database since there are lots of combinations of different sizes to use for the dimensions. There is a formula created that figures out the price depending on what's typed into the boxes. I don't have the Place Order button working yet. This is where I'm stuck and not sure what to do. Which site above do I use? Or is stripe.com the only one I really need to use to process a credit card? I do want to set up a shopping cart also, but how do I do that with this dynamic code that is not stored in a database? Do I just use session variables? I don't have products to just display them in a table like the example in the Cartweaver web site. How would you set up a shopping cart with ordering info. for credit cards on it? Andy
... View more
‎Apr 15, 2016
07:07 AM
Jamo, I think this is where I'm getting confused. Even the code you have above, does that go inside Java Script tags like this: <SCRIPT LANGUAGE="JavaScript"> </script> If so, where do you put this? In it's own page under the root level of the site if that's where the form is located? Do I have to call the file a specific name? So there would just be this page and the form page, correct? Or do I have to download a zip file that has all the library files, data, etc. in it? I can't remember where this is located. I found the form on stripe.com that is an example and I think I can get the token created, but I'm not sure where to put the code for charging the card at. It doesn't explain that very well. It's the code for either Ruby, Java, etc. Here's what I have on my test_stripe.html page so far: <script type="text/javascript" src="https://js.stripe.com/v2/"></script> <!-- jQuery is used only for this example; it isn't required to use Stripe --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> // This identifies your website in the createToken call below Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY'); var stripeResponseHandler = function(status, response) { var $form = $('#payment-form'); if (response.error) { // Show the errors on the form $form.find('.payment-errors').text(response.error.message); $form.find('button').prop('disabled', false); } else { // token contains id, last4, and card type var token = response.id; // Insert the token into the form so it gets submitted to the server $form.append($('<input type="hidden" name="stripeToken" />').val(token)); // and re-submit $form.get(0).submit(); } }; jQuery(function($) { $('#payment-form').submit(function(e) { var $form = $(this); // Disable the submit button to prevent repeated clicks $form.find('button').prop('disabled', true); Stripe.card.createToken($form, stripeResponseHandler); // Prevent the form from submitting with the default action return false; }); }); </script> </head> <body> <h1>Charge $10 with Stripe</h1> <form action="" method="POST" id="payment-form"> <span class="payment-errors"></span> <div class="form-row"> <label> <span>Card Number</span> <input type="text" size="20" data-stripe="number"/> </label> </div> <div class="form-row"> <label> <span>CVC</span> <input type="text" size="4" data-stripe="cvc"/> </label> </div> <div class="form-row"> <label> <span>Expiration (MM/YYYY)</span> <input type="text" size="2" data-stripe="exp-month"/> </label> <span> / </span> <input type="text" size="4" data-stripe="exp-year"/> </div> <button type="submit">Submit Payment</button> </form> Where do I put this java script code at to charge the card? // Set your secret key: remember to change this to your live secret key in production // See your keys here https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_aXVaomllq5y04qU7rM8YQHvv"; // Get the credit card details submitted by the form String token = request.getParameter("stripeToken"); // Create the charge on Stripe's servers - this will charge the user's card try { Map<String, Object> chargeParams = new HashMap<String, Object>(); chargeParams.put("amount", 1000); // amount in cents, again chargeParams.put("currency", "usd"); chargeParams.put("source", token); chargeParams.put("description", "Example charge"); Charge charge = Charge.create(chargeParams); } catch (CardException e) { // The card has been declined } Once I know where to put this, is this all I need and it will charge my test credit card and show up in my account, correct? Is there anything else I'm missing? Andy
... View more
‎Apr 14, 2016
11:17 AM
Hi. Does anyone know how to integrate a Cold Fusion form with the payment site stripe.com? I've tried taking their examples to see if I could just get money from the form into my test account on Stripe, but it doesn't work. I've updated the PublishableKey with the test key I have in my account. I'm not sure if I need to download something else to our site first in order for it to work. Has anyone used this site before to do payments with their cold fusion forms? Andy
... View more
‎Apr 12, 2016
07:19 AM
1 Upvote
BKBK, No, the changes did not solve my original problem. Why do you advise to limit a number of digits after the C? I would have to check with engineering to see how many digits can go after a C for the part number. I'm not sure if the program we use to create part numbers has a limit of digits after the C or not. Andy
... View more