1 | <?php |
||
2 | |||
3 | namespace Pronamic\WordPress\Pay\Gateways\TargetPay; |
||
4 | |||
5 | use Pronamic\WordPress\Pay\Core\Util; |
||
6 | |||
7 | /** |
||
8 | * Title: TargetPay SOFORT Banking client |
||
9 | * Description: |
||
10 | * Copyright: 2005-2021 Pronamic |
||
11 | * Company: Pronamic |
||
12 | * |
||
13 | * @author Remco Tolsma |
||
14 | * @version 2.0.0 |
||
15 | * @since 1.0.0 |
||
16 | */ |
||
17 | class SofortClient { |
||
18 | /** |
||
19 | * URL to start an transaction |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | const URL_START_TRANSACTION = 'https://www.targetpay.com/directebanking/start'; |
||
24 | |||
25 | /** |
||
26 | * Constructs and initializes an TargetPay SOFORT Banking client object |
||
27 | */ |
||
28 | public function __construct() { |
||
29 | |||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Remote get. |
||
34 | * |
||
35 | * @param string $url Request URL. |
||
36 | */ |
||
37 | private static function remote_get( $url ) { |
||
0 ignored issues
–
show
|
|||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Start transaction |
||
42 | * |
||
43 | * @param SofortStartParameters $parameters Sofort start parameters. |
||
44 | */ |
||
45 | public function start_transaction( SofortStartParameters $parameters ) { |
||
46 | $url = Util::build_url( self::URL_START_TRANSACTION, (array) $parameters ); |
||
47 | |||
48 | $data = self::remote_get( $url ); |
||
0 ignored issues
–
show
Are you sure the assignment to
$data is correct as self::remote_get($url) targeting Pronamic\WordPress\Pay\G...ortClient::remote_get() seems to always return null.
This check looks for function or method calls that always return null and whose return value is assigned to a variable. class A
{
function getObject()
{
return null;
}
}
$a = new A();
$object = $a->getObject();
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
Loading history...
|
|||
49 | |||
50 | // @todo need work |
||
51 | } |
||
52 | } |
||
53 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.