Skip to content

Commit 34722bb

Browse files
committed
fix(paypal): Proper logo URL on PayPal web profile
1 parent 3272cb9 commit 34722bb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/apps/paypal/src/util/paypal-api.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ export const executePaypalPayment = async (
111111

112112
export const createPaypalProfile = async () => {
113113
const { settingsContent } = config.get();
114+
const { domain } = settingsContent;
114115
return (await getPaypalAxios()).post('/v1/payment-experience/web-profiles/', {
115116
name: `EComPlus_${Date.now()}`,
116117
presentation: {
117118
brand_name: settingsContent.name || 'Loja Virtual',
118-
logo_image: settingsContent.logo
119-
|| 'https://www.paypalobjects.com/webstatic/mktg/logo/AM_SbyPP_mc_vs_dc_ae.jpg',
119+
logo_image: domain && settingsContent.logo
120+
? `https://${domain}${settingsContent.logo}`
121+
: 'https://www.paypalobjects.com/webstatic/mktg/logo/AM_SbyPP_mc_vs_dc_ae.jpg',
120122
locale_code: settingsContent.countryCode || 'BR',
121123
},
122124
input_fields: {
@@ -126,8 +128,8 @@ export const createPaypalProfile = async () => {
126128
},
127129
flow_config: {
128130
landing_page_type: 'billing',
129-
bank_txn_pending_url: settingsContent.domain
130-
? `https://${settingsContent.domain}/app/#/confirmation/`
131+
bank_txn_pending_url: domain
132+
? `https://${domain}/app/#/confirmation/`
131133
: 'http://www.yeowza.com',
132134
},
133135
});

0 commit comments

Comments
 (0)