Skip to content

Commit

Permalink
Enable customer updates for auto tax id collection (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Aug 30, 2021
1 parent 44b49e9 commit d7651e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Concerns/PerformsCharges.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public function checkout($items, array $sessionOptions = [], array $customerOpti
],
]);

// Make sure to collect address and name when Tax ID collection is enabled...
if ($payload['tax_id_collection']['enabled'] ?? false) {
$payload['customer_update']['address'] = 'auto';
$payload['customer_update']['name'] = 'auto';
}

return Checkout::create($this, array_merge($payload, $sessionOptions), $customerOptions);
}

Expand Down

0 comments on commit d7651e3

Please sign in to comment.