Skip to content

Commit

Permalink
this is the right place for the Button-Payments ...
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolorenz committed Nov 3, 2023
1 parent 8856ec7 commit 6d44e54
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Core/ViewConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,15 @@ public function getPayload(): string
"phoneNumber",
"billingAddress"
]);
$payload->setPaymentIntent('AuthorizeWithCapture');

$paymentIntent = 'Authorize';
$canHandlePendingAuth = true;
if (OxidServiceProvider::getAmazonClient()->getModuleConfig()->isOneStepCapture()) {
$paymentIntent = 'AuthorizeWithCapture';
$canHandlePendingAuth = false;
}
$payload->setPaymentIntent($paymentIntent);
$payload->setCanHandlePendingAuthorization($canHandlePendingAuth);

$delAddress = OxidServiceProvider::getDeliveryAddressService();
$address = $delAddress->getTempDeliveryAddressAddress();
Expand Down

0 comments on commit 6d44e54

Please sign in to comment.