Issues (36)

src/Traits/PayPalAPI/Orders/Helpers.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Srmklive\PayPal\Traits\PayPalAPI\Orders;
4
5
use Throwable;
6
7
trait Helpers
8
{
9
    /**
10
     * Confirm payment for an order.
11
     *
12
     * @param string $order_id
13
     * @param string $processing_instruction
14
     *
15
     * @throws Throwable
16
     *
17
     * @return array|\Psr\Http\Message\StreamInterface|string
18
     */
19
    public function setupOrderConfirmation(string $order_id, string $processing_instruction = '')
20
    {
21
        $body = [
22
            'processing_instruction' => $processing_instruction,
23
            'application_context'    => $this->experience_context,
24
            'payment_source'         => $this->payment_source,
25
        ];
26
27
        return $this->confirmOrder($order_id, $body);
0 ignored issues
show
It seems like confirmOrder() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        return $this->/** @scrutinizer ignore-call */ confirmOrder($order_id, $body);
Loading history...
28
    }
29
}
30