Skip to content

Commit

Permalink
Set card payment source only for card-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt75 committed Apr 10, 2024
1 parent eb97302 commit b8dd91f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function handle(CreatePayPalOrderCommand $command)
{
$cartPresenter = (new CartPresenter())->present();
$builder = new OrderPayloadBuilder($cartPresenter);
$builder->setIsCard($command->getFundingSource() === 'card');
$builder->setIsCard($command->getFundingSource() === 'card' && $command->isHostedFields());
$builder->setExpressCheckout($command->isExpressCheckout());

if ($this->shopContext->isShop17()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function handle(UpdatePayPalOrderCommand $command)
$builder = new OrderPayloadBuilder($cartPresenter, true);
$builder->setIsUpdate(true);
$builder->setPaypalOrderId($command->getPayPalOrderId()->getValue());
$builder->setIsCard($command->getFundingSource() === 'card');
$builder->setIsCard($command->getFundingSource() === 'card' && $command->isHostedFields());
$builder->setExpressCheckout($command->isExpressCheckout());

if ($this->shopContext->isShop17()) {
Expand Down

0 comments on commit b8dd91f

Please sign in to comment.