Skip to content

Commit

Permalink
Merge pull request #11 from JonPurvis/add-crypto-onramp-sessions
Browse files Browse the repository at this point in the history
add crypto onramp sessions
  • Loading branch information
JonPurvis authored Jul 10, 2023
2 parents eecdcbe + bb884bb commit ea5eb82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ the names of resources _should_ match what's in this package.
| [VerificationSessions](https://stripe.com/docs/api/identity/verification_sessions) | `stripeIdentityVerificationSessionId()` | `vs_j8AvYT7Tbmjz26tASmjdcyNt` |
| [Transactions](https://stripe.com/docs/api/identity/verification_reports) | `stripeIdentityVerificationReportId()` | `vr_IwuD3wV5qfD4t4fbTOzWwUm6` |

### Crypto
| API Resource | Method | Example ID |
|-----------------------------------------------------------------------|---------------------------------|--------------------------------|
| [Onramp Sessions](https://stripe.com/docs/api/crypto/onramp_sessions) | `stripeCryptoOnrampSessionId()` | `cos_wlo5PYZC2j8lFHnMaxbuFBK8` |


### Webhooks
| API Resource | Method | Example ID |
|----------------------------------------------------------------------|--------------------------------|---------------------------------------|
Expand Down
4 changes: 4 additions & 0 deletions src/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,8 @@ public function stripeWebhookApplicationId(): string
return 'ca_' . $this->generateRandomString(32);
}

public function stripeCryptoOnrampSessionId(): string
{
return 'cos_' . $this->generateRandomString();
}
}
4 changes: 4 additions & 0 deletions tests/StripeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,8 @@

it('generates a webhook application id', function () {
expect($this->fake->stripeWebhookApplicationId())->toStartWith('ca_')->toHaveLength(35);
});

it('generates a crypto onramp session id', function () {
expect($this->fake->stripeCryptoOnrampSessionId())->toStartWith('cos_')->toHaveLength(28);
});

0 comments on commit ea5eb82

Please sign in to comment.