File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function ButtonStripe(props: {
1919 { price : props . price_id , quantity : 1 } ,
2020 ] ,
2121 mode : "subscription" ,
22- clientReferenceId : props . donorname + sep + props . forumname ,
22+ clientReferenceId : ( props . donorname || "" ) + sep + ( props . forumname || "" ) ,
2323 successUrl : process . env . GATSBY_SITEURL + "/donate/success-stripe" ,
2424 cancelUrl : process . env . GATSBY_SITEURL + "/donate" ,
2525 } ) ;
Original file line number Diff line number Diff line change @@ -38,17 +38,11 @@ export default class PageStripe extends React.Component {
3838 const handleOneTimeClick = async event => {
3939 // When the customer clicks on the button, redirect them to Checkout.
4040 let sep = "\u2028" ;
41- let donorname = "" ;
4241 if ( this . state . otPrice === "" || ! / ^ \d + $ / . test ( this . state . otPrice ) ) {
4342 return ;
4443 }
45- if ( this . state . donor != "" ) {
46- donorname = this . state . donor ;
47- }
48- let forumname = "" ;
49- if ( this . state . forum != "" ) {
50- forumname = this . state . forum ;
51- }
44+ let donorname = this . state . donor || "" ;
45+ let forumname = this . state . forum || "" ;
5246 let current_datetime = new Date ( ) ;
5347 const stripe = await stripePromise ;
5448 const { error } = await stripe . redirectToCheckout ( {
You can’t perform that action at this time.
0 commit comments