- if ($order->canReviewPayment()) {
- $message = __('Are you sure you want to accept this payment?');
- $this->buttonList->add(
- 'accept_payment',
- [
- 'label' => __('Accept Payment'),
- 'onclick' => "confirmSetLocation('{$message}', '{$this->getReviewPaymentUrl('accept')}')"
- ]
- );
- $message = __('Are you sure you want to deny this payment?');
- $this->buttonList->add(
- 'deny_payment',
- [
- 'label' => __('Deny Payment'),
- 'onclick' => "confirmSetLocation('{$message}', '{$this->getReviewPaymentUrl('deny')}')"
- ]
- );
- }