Skip to content

Commit

Permalink
Add recaptcha values to transaction request
Browse files Browse the repository at this point in the history
  • Loading branch information
darlenedms committed Mar 22, 2020
1 parent 118877e commit e957294
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/checkout.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Checkout
quantity: 0
})
@updateItems(itemsToRemove, expectedOrderFormSections)

# Clone an item to one or more new items like it
cloneItem: (itemIndex, newItemsOptions, expectedFormSections = @_allOrderFormSections) =>
@_updateOrderForm
Expand Down Expand Up @@ -390,7 +390,7 @@ class Checkout
items: items
postalCode: postalCode
country: country
else
else
[shippingData,orderFormId] = [arguments[0], arguments[1]]
dataRequest =
shippingData: shippingData
Expand Down Expand Up @@ -423,7 +423,7 @@ class Checkout
data: {email: email, sc: salesChannel}

# Sends a request to start the transaction. This is the final step in the checkout process.
startTransaction: (value, referenceValue, interestValue, savePersonalData = false, optinNewsLetter, expectedOrderFormSections = @_allOrderFormSections) =>
startTransaction: (value, referenceValue, interestValue, savePersonalData = false, optinNewsLetter, expectedOrderFormSections = @_allOrderFormSections, recaptchaKey, recaptchaToken) =>
transactionRequest = {
referenceId: @_getOrderFormId()
savePersonalData: savePersonalData
Expand All @@ -432,6 +432,8 @@ class Checkout
referenceValue: referenceValue
interestValue: interestValue
expectedOrderFormSections : expectedOrderFormSections
recaptchaKey: recaptchaKey
recaptchaToken: recaptchaToken
}
@_updateOrderForm
url: @_startTransactionURL(),
Expand Down

0 comments on commit e957294

Please sign in to comment.