Closed LaskeJu closed 3 years ago
I have added the following code to fix the error: File: "Api/CreateOrderApi.php" => "public function create(string $token, PaymentInterface $payment, string $referenceId): array"
'tax_total' => [
'currency_code' => $order->getCurrencyCode(),
'value' => $payPalItemData['total_tax'],
],
//added this:
'discount' => [
'currency_code' => $order->getCurrencyCode(),
'value' => abs($order->getOrderPromotionTotal()) / 100,
]
This is how it works for me.
@LaskeJu we have the problem too. Are you able to propose your fix in a PR as it can be shared to everyone ?
@romainguerrero added PR #175
I believe it can be closed due to #175 🖖
When I perform a payment, while i using an discount code. The create-pay-pal-order route fails and i cant pay my order.