Skip to content

Commit

Permalink
chore: refactoring customer details
Browse files Browse the repository at this point in the history
  • Loading branch information
Govind Diwakar committed Apr 9, 2024
1 parent 19b691d commit 200936d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/razorpay-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ abstract class RazorpayBase extends AbstractPaymentProcessor {
// edit the customer
if (razorpayCustomer) {
{
const email = cart.email ?? customer.email;
const editEmail = cart.email ?? customer.email;
const editName = `${
cart.billing_address.first_name ?? customer.first_name
} ${cart.billing_address.last_name ?? customer.last_name}`;
Expand All @@ -201,7 +201,7 @@ abstract class RazorpayBase extends AbstractPaymentProcessor {
const updateRazorpayCustomer = await this.razorpay_.customers.edit(
razorpayCustomer.id,
{
email: email ?? razorpayCustomer.email,
email: editEmail ?? razorpayCustomer.email,
contact: editPhone ?? razorpayCustomer.contact!,
name: editName ?? razorpayCustomer.name,
}
Expand Down

0 comments on commit 200936d

Please sign in to comment.