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)
204204 return $ this ->setParameter ('card ' , $ value );
205205 }
206206
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+
207228 /**
208229 * Get the card token.
209230 *
Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ public function testSetCardWithArray()
7878 $ this ->assertSame ('1234 ' , $ card ->getNumber ());
7979 }
8080
81+ public function testCreateToken ()
82+ {
83+ $ this ->assertSame ($ this ->request , $ this ->request ->setCreateToken (true ));
84+ $ this ->assertTrue ($ this ->request ->getCreateToken ());
85+ }
86+
8187 public function testToken ()
8288 {
8389 $ this ->assertSame ($ this ->request , $ this ->request ->setToken ('12345 ' ));
You can’t perform that action at this time.
0 commit comments