Fix passing funding_source on block pages.

This commit is contained in:
Pedro Silva 2024-01-19 09:52:59 +00:00
parent 300e8f377c
commit 827bd2568d
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -77,7 +77,7 @@ const PayPalComponent = ({
window.ppcpContinuationFilled = true;
}, [])
const createOrder = async () => {
const createOrder = async (data, actions) => {
try {
const res = await fetch(config.scriptData.ajax.create_order.endpoint, {
method: 'POST',
@ -87,6 +87,7 @@ const PayPalComponent = ({
bn_code: '',
context: config.scriptData.context,
payment_method: 'ppcp-gateway',
funding_source: data.paymentSource,
createaccount: false
}),
});