Problem with the hostedField font-family
marcoB92
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jan-31-2023
07:14 AM
Hello everyone,
as explained in the title, I cannot change the font-family of hostedField inputs.
I followed the steps in the documentation, but the font does not change, my profect is on Nuxt 2, and this is my code:
paypal() {
const paypalButton = window.paypal.Buttons({
fundingSource: window.paypal.FUNDING.PAYPAL,
style: {
color: 'gold',
label: 'pay'
},
createOrder: (data, actions) => this.create(data, actions),
onApprove: (data, actions) => this.approve(data, actions),
})
if (paypalButton.isEligible()) {
paypalButton.render('#paypal-button-container')
}
if (window.paypal.HostedFields.isEligible()) {
window.paypal.HostedFields.render({
fields: {
number: {
selector: "#card-number",
placeholder: "4111 1111 1111 1111",
},
expirationDate: {
selector: "#expiration-date",
placeholder: "MM/YY",
},
},
styles: {
input: {
'font-family': 'Titillium Web, sans-serif'
}
},
createOrder: (data, actions) => this.create(data, actions),
}).then(hostedFields => {
this.renderCardSvg(hostedFields.getCardTypes())
hostedFields.on('notEmpty', (event) => {
this[event.emittedBy] = true
})
hostedFields.on('empty', (event) => {
this[event.emittedBy] = false
})
const form = this.$refs.funnel_form.$refs.form
form.addEventListener('submit', (event) => {
event.preventDefault()
hostedFields.submit().then(() => {
this.approve({ orderId: this.orderId })
}).catch(error => {
console.log(error)
this.showErrorBox = true
})
})
})
}
},
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Activity Report does not work in Sandbox Environment
- IPN requests not reaching the listener in REST APIs
- How to add a second parameter onto the PayPal standard payment code block? in PayPal Payments Standard
- API approved order not forwarding to PayPal in Sandbox Environment
- Paypal NVP/SOAP API - Pay in 4 instalment payments in NVP/SOAP APIs