Skip to content

Commit

Permalink
docs: paypal
Browse files Browse the repository at this point in the history
  • Loading branch information
izhiqiang committed Jun 7, 2024
1 parent a4d728a commit 7f02c74
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,10 @@ $config = [

### [PayPal](https://developer.paypal.com/docs/log-in-with-paypal/)

您需要额外配置 `team_url` 为您的团队域名,例如:
您可能需要设置responseType,可以使用`withResponseType`函数进行设置,默认是`code` 还可以设置为`id_token``code` & `id_token`

> https://developer.paypal.com/docs/log-in-with-paypal/integrate/generate-button/

```php
$config = [
Expand Down
21 changes: 21 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,26 @@ $config = [
];
```

### [PayPal](https://developer.paypal.com/docs/log-in-with-paypal/)

You may need to set the responseType, which can be set using the `withResponseType` function. The default is `code` and can also be set to `id_token` or `code` & `id_token`

> https://developer.paypal.com/docs/log-in-with-paypal/integrate/generate-button/

```php
$config = [
'paypal' => [
'client_id' => 'AT******************',
'client_secret' => 'EK**************',
'sandbox' => false,
'redirect_url'=>"nativexo://paypalpay",
],
];
```



## Some Skill

### Scopes
Expand Down Expand Up @@ -627,6 +647,7 @@ $user = $socialite->userFromToken($accessToken);
- [Tapd - 用户授权说明](https://www.tapd.cn/help/show#1120003271001000093)
- [Line - OAuth 2.0](https://developers.line.biz/en/docs/line-login/integrate-line-login/)
- [Gitee - OAuth文档](https://gitee.com/api/v5/oauth_doc#/)
- [PayPal - OAuth文档](https://developer.paypal.com/docs/log-in-with-paypal/)

[![Sponsor me](https://github.com/overtrue/overtrue/blob/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)

Expand Down
3 changes: 2 additions & 1 deletion src/Providers/PayPal.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ public function __construct(array $config)
}

/**
* @param string|null $response_type
* @param string|null $responseType
* @return $this
* @see https://developer.paypal.com/docs/log-in-with-paypal/integrate/generate-button/
*/
public function withResponseType(?string $responseType)
{
Expand Down

0 comments on commit 7f02c74

Please sign in to comment.