DataUrlHelper::set_cancel_url()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Ingenico;
4
5
use Pronamic\WordPress\Pay\Gateways\Ingenico\Parameters;
6
7
/**
8
 * Title: Ingenico data URL helper class
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 DataUrlHelper extends DataHelper {
18
	/**
19
	 * Set accept URL
20
	 *
21
	 * URL of the web page to show the customer when the payment is authorized.
22
	 *
23
	 * @param string $url
24
	 */
25 1
	public function set_accept_url( $url ) {
26 1
		return $this->set_field( Parameters::ACCEPT_URL, $url );
27
	}
28
29
	/**
30
	 * Set cancel URL
31
	 *
32
	 * URL of the web page to show the customer when he cancels the payment.
33
	 *
34
	 * @param string $url
35
	 */
36 1
	public function set_cancel_url( $url ) {
37 1
		return $this->set_field( Parameters::CANCEL_URL, $url );
38
	}
39
40
	/**
41
	 * Set exception URL
42
	 *
43
	 * URL of the web page to show the customer when the payment result is uncertain.
44
	 *
45
	 * @param string $url
46
	 */
47 1
	public function set_exception_url( $url ) {
48 1
		return $this->set_field( Parameters::EXCEPTION_URL, $url );
49
	}
50
51
	/**
52
	 * Set decline URL
53
	 *
54
	 * URL of the web page to show the customer when the acquirer rejects the authorisation more
55
	 * than the maximum of authorised tries (10 by default, but can be changed in the technical
56
	 * information page).
57
	 *
58
	 * @param string $url
59
	 */
60 1
	public function set_decline_url( $url ) {
61 1
		return $this->set_field( Parameters::DECLINE_URL, $url );
62
	}
63
64
	/**
65
	 * Set home URL
66
	 *
67
	 * @param string $url
68
	 */
69 1
	public function set_home_url( $url ) {
70 1
		return $this->set_field( 'home', $url );
71
	}
72
73
	/**
74
	 * Set back URL
75
	 *
76
	 * @param string $url
77
	 */
78 1
	public function set_back_url( $url ) {
79 1
		return $this->set_field( 'backurl', $url );
80
	}
81
}
82