Skip to content

Commit 590a0c1

Browse files
committed
fix(asaas): Fixing customer phone and name format on creation for new transaction
1 parent 7c6648b commit 590a0c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/apps/asaas/src/asaas-create-transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ export default async (modBody: AppModuleBody<'create_transaction'>) => {
6161
id: asaasCustomerId,
6262
},
6363
} = await asaasAxios.post('/v3/customers', {
64-
'name': getFullname(buyer),
64+
'name': buyer.fullname || getFullname(buyer) || customerAddr?.name || buyer.email,
6565
'cpfCnpj': buyer.doc_number,
6666
'email': buyer.email,
67-
'mobilePhone': getPhone(buyer),
67+
'mobilePhone': getPhone(buyer) || undefined,
6868
'address': customerAddr?.street,
6969
'addressNumber': customerAddr?.number?.toString(),
7070
'complement': customerAddr?.complement,

0 commit comments

Comments
 (0)