initial sample app changes for ppcp - #91
Open
ragarwal-spreedly wants to merge 8 commits into
Open
Conversation
| * 500: | ||
| * description: Error minting client token | ||
| */ | ||
| router.get('/ppcp/client-token', getPPCPClientToken); |
Comment on lines
+36
to
+39
| list.innerHTML = rows | ||
| .filter(([, value]) => value !== undefined && value !== null && value !== '') | ||
| .map(([key, value]) => `<dt>${key}</dt><dd>${value}</dd>`) | ||
| .join(''); |
Comment on lines
+158
to
+181
| const transactionResponse = await axios.post( | ||
| `${config.spreedlyUrl}/v1/gateways/${config.ppcpGatewayToken}/${transactionType}.json`, | ||
| { | ||
| transaction: { | ||
| payment_method_token: paymentMethodToken, | ||
| amount: toMinorUnits(amount), | ||
| currency_code, | ||
| // Dedicated return page — with presentationMode 'redirect' the buyer lands here | ||
| // rather than back on the checkout page, and it captures using the | ||
| // ?transaction_token= Spreedly appends. See src/static/ppcp/return/. | ||
| redirect_url: `${origin}/ppcp/return/`, | ||
| // Required by Spreedly, but its v6 semantics are UNVERIFIED — the gateway doc says only | ||
| // that offsite transactions need one. (Spreedly's public offsite-callbacks page | ||
| // describes the PayPal v5 / Braintree-era flow, so it is not a source of truth here.) | ||
| // Pointed at a real route rather than a static page because a POST is the plausible | ||
| // shape and a route can at least answer one. Empirically NOT load-bearing: a checkout | ||
| // completed end-to-end while this pointed at a static HTML page — the redirect leg is | ||
| // what finalizes the authorization. Open question for the Gateway team. | ||
| callback_url: `${origin}/api/v1/offsite-callback`, | ||
| retain_on_success: true, | ||
| }, | ||
| }, | ||
| { headers: spreedlyHeaders() } | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.