File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,27 @@ public function setCard($value)
204
204
return $ this ->setParameter ('card ' , $ value );
205
205
}
206
206
207
+ /**
208
+ * Set whether you wish to generate and store a card token with this request.
209
+ *
210
+ * @param bool $value
211
+ * @return $this
212
+ */
213
+ public function setCreateToken ($ value )
214
+ {
215
+ return $ this ->setParameter ('createToken ' , $ value );
216
+ }
217
+
218
+ /**
219
+ * Get whether you wish to generate and store a card token with this request.
220
+ *
221
+ * @return bool
222
+ */
223
+ public function getCreateToken ()
224
+ {
225
+ return $ this ->getParameter ('createToken ' );
226
+ }
227
+
207
228
/**
208
229
* Get the card token.
209
230
*
Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ public function testSetCardWithArray()
78
78
$ this ->assertSame ('1234 ' , $ card ->getNumber ());
79
79
}
80
80
81
+ public function testCreateToken ()
82
+ {
83
+ $ this ->assertSame ($ this ->request , $ this ->request ->setCreateToken (true ));
84
+ $ this ->assertTrue ($ this ->request ->getCreateToken ());
85
+ }
86
+
81
87
public function testToken ()
82
88
{
83
89
$ this ->assertSame ($ this ->request , $ this ->request ->setToken ('12345 ' ));
You can’t perform that action at this time.
0 commit comments