File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -665,6 +665,16 @@ public function paddleEmail()
665665 return (string ) $ this ->paddleInfo ()['user_email ' ];
666666 }
667667
668+ /**
669+ * Get the payment method type from the subscription.
670+ *
671+ * @return string
672+ */
673+ public function paymentMethod ()
674+ {
675+ return (string ) $ this ->paddleInfo ()['payment_information ' ]['payment_method ' ];
676+ }
677+
668678 /**
669679 * Get the card brand from the subscription.
670680 *
Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ public function test_subscriptions_can_retrieve_their_payment_info()
199199 ]);
200200
201201 $ this ->assertSame ('john@example.com ' , $ subscription ->paddleEmail ());
202+ $ this ->assertSame ('card ' , $ subscription ->paymentMethod ());
202203 $ this ->assertSame ('master ' , $ subscription ->cardBrand ());
203204 $ this ->assertSame ('4050 ' , $ subscription ->cardLastFour ());
204205 }
You can’t perform that action at this time.
0 commit comments