Skip to content

Commit 546fc07

Browse files
Bump SDK version to 0.6.0; Resolve name changes related to bump (#165)
1 parent 843672d commit 546fc07

File tree

24 files changed

+96
-86
lines changed

24 files changed

+96
-86
lines changed

advanced-integration/v2/server/dotnet/PayPalAdvancedIntegration.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
10-
<PackageReference Include="PayPalServerSDK" Version="0.5.3" />
10+
<PackageReference Include="PayPalServerSDK" Version="0.6.0" />
1111
</ItemGroup>
12-
</Project>
12+
</Project>

advanced-integration/v2/server/dotnet/Server.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
using Microsoft.Extensions.DependencyInjection;
88
using Microsoft.Extensions.Hosting;
99
using Microsoft.Extensions.Logging;
10-
using PaypalServerSDK.Standard;
11-
using PaypalServerSDK.Standard.Authentication;
12-
using PaypalServerSDK.Standard.Controllers;
13-
using PaypalServerSDK.Standard.Http.Response;
14-
using PaypalServerSDK.Standard.Models;
10+
using PaypalServerSdk.Standard;
11+
using PaypalServerSdk.Standard.Authentication;
12+
using PaypalServerSdk.Standard.Controllers;
13+
using PaypalServerSdk.Standard.Http.Response;
14+
using PaypalServerSdk.Standard.Models;
1515
using IConfiguration = Microsoft.Extensions.Configuration.IConfiguration;
1616

1717
namespace PayPalAdvancedIntegration;
@@ -79,8 +79,8 @@ public CheckoutController(IConfiguration configuration, ILogger<CheckoutControll
7979
_logger = logger;
8080

8181
// Initialize the PayPal SDK client
82-
PaypalServerSDKClient client = new PaypalServerSDKClient.Builder()
83-
.Environment(PaypalServerSDK.Standard.Environment.Sandbox)
82+
PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()
83+
.Environment(PaypalServerSdk.Standard.Environment.Sandbox)
8484
.ClientCredentialsAuth(
8585
new ClientCredentialsAuthModel.Builder(_paypalClientId, _paypalClientSecret).Build()
8686
)

advanced-integration/v2/server/java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
paypal-server-sdk
4949
</artifactId>
5050
<version>
51-
0.5.1
51+
0.6.0
5252
</version>
5353
</dependency>
5454
</dependencies>

advanced-integration/v2/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.springframework.web.client.RestTemplate;
1717

1818
import com.paypal.sdk.Environment;
19-
import com.paypal.sdk.PaypalServerSDKClient;
19+
import com.paypal.sdk.PaypalServerSdkClient;
2020
import com.paypal.sdk.authentication.ClientCredentialsAuthModel;
2121
import com.paypal.sdk.controllers.OrdersController;
2222
import com.paypal.sdk.exceptions.ApiException;
@@ -53,8 +53,8 @@ public RestTemplate restTemplate() {
5353
}
5454

5555
@Bean
56-
public PaypalServerSDKClient paypalClient() {
57-
return new PaypalServerSDKClient.Builder()
56+
public PaypalServerSdkClient paypalClient() {
57+
return new PaypalServerSdkClient.Builder()
5858
.loggingConfig(builder -> builder
5959
.level(Level.DEBUG)
6060
.requestConfig(logConfigBuilder -> logConfigBuilder.body(true))
@@ -75,9 +75,9 @@ public PaypalServerSDKClient paypalClient() {
7575
public class CheckoutController {
7676

7777
private final ObjectMapper objectMapper;
78-
private final PaypalServerSDKClient client;
78+
private final PaypalServerSdkClient client;
7979

80-
public CheckoutController(ObjectMapper objectMapper, PaypalServerSDKClient client) {
80+
public CheckoutController(ObjectMapper objectMapper, PaypalServerSdkClient client) {
8181
this.objectMapper = objectMapper;
8282
this.client = client;
8383
}

advanced-integration/v2/server/node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"dependencies": {
7-
"@paypal/paypal-server-sdk": "^0.5.1",
7+
"@paypal/paypal-server-sdk": "^0.6.0",
88
"body-parser": "^1.20.3",
99
"dotenv": "^16.3.1",
1010
"express": "^4.18.2"

advanced-integration/v2/server/node/server.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const ordersController = new OrdersController(client);
4242
const createOrder = async (cart) => {
4343
const collect = {
4444
body: {
45-
intent: CheckoutPaymentIntent.CAPTURE,
45+
intent: CheckoutPaymentIntent.Capture,
4646
purchaseUnits: [
4747
{
4848
amount: {
@@ -56,8 +56,9 @@ const createOrder = async (cart) => {
5656
};
5757

5858
try {
59-
const { body, ...httpResponse } =
60-
await ordersController.ordersCreate(collect);
59+
const { body, ...httpResponse } = await ordersController.ordersCreate(
60+
collect
61+
);
6162
// Get more response info...
6263
// const { statusCode, headers } = httpResponse;
6364
return {
@@ -83,8 +84,9 @@ const captureOrder = async (orderID) => {
8384
};
8485

8586
try {
86-
const { body, ...httpResponse } =
87-
await ordersController.ordersCapture(collect);
87+
const { body, ...httpResponse } = await ordersController.ordersCapture(
88+
collect
89+
);
8890
// Get more response info...
8991
// const { statusCode, headers } = httpResponse;
9092
return {

advanced-integration/v2/server/php/composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
"require": {
55
"php": "^7.4 || ^8.0",
66
"ext-json": "*",
7-
"paypal/paypal-server-sdk": "0.5.1"
7+
"paypal/paypal-server-sdk": "0.6.0"
88
},
99
"require-dev": {
1010
},
1111
"scripts": {
12-
"start": "php -S localhost:8080 -t src"
12+
"start": [
13+
"Composer\\Config::disableProcessTimeout",
14+
"php -S localhost:8080 -t src"
15+
]
1316
},
1417
"config": {
1518
}

advanced-integration/v2/server/php/composer.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

advanced-integration/v2/server/php/src/index.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
require __DIR__ . '/../vendor/autoload.php';
33

4-
use PaypalServerSDKLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
5-
use PaypalServerSDKLib\Environment;
6-
use PaypalServerSDKLib\PaypalServerSDKClientBuilder;
7-
use PaypalServerSDKLib\Models\Builders\OrderRequestBuilder;
8-
use PaypalServerSDKLib\Models\CheckoutPaymentIntent;
9-
use PaypalServerSDKLib\Models\Builders\PurchaseUnitRequestBuilder;
10-
use PaypalServerSDKLib\Models\Builders\AmountWithBreakdownBuilder;
4+
use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
5+
use PaypalServerSdkLib\Environment;
6+
use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
7+
use PaypalServerSdkLib\Models\Builders\OrderRequestBuilder;
8+
use PaypalServerSdkLib\Models\CheckoutPaymentIntent;
9+
use PaypalServerSdkLib\Models\Builders\PurchaseUnitRequestBuilder;
10+
use PaypalServerSdkLib\Models\Builders\AmountWithBreakdownBuilder;
1111

1212
$PAYPAL_CLIENT_ID = getenv('PAYPAL_CLIENT_ID');
1313
$PAYPAL_CLIENT_SECRET = getenv('PAYPAL_CLIENT_SECRET');
1414

15-
$client = PaypalServerSDKClientBuilder::init()
15+
$client = PaypalServerSdkClientBuilder::init()
1616
->clientCredentialsAuthCredentials(
1717
ClientCredentialsAuthCredentialsBuilder::init(
1818
$PAYPAL_CLIENT_ID,
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Flask==3.0.3
2-
paypal-server-sdk==0.5.2
2+
paypal-server-sdk==0.6.0

advanced-integration/v2/server/python/server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials
66
from paypalserversdk.logging.configuration.api_logging_configuration import LoggingConfiguration, \
77
RequestLoggingConfiguration, ResponseLoggingConfiguration
8-
from paypalserversdk.paypalserversdk_client import PaypalserversdkClient
8+
from paypalserversdk.paypal_serversdk_client import PaypalServersdkClient
99
from paypalserversdk.controllers.orders_controller import OrdersController
1010
from paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown
1111
from paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent
@@ -15,7 +15,7 @@
1515

1616
app = Flask(__name__)
1717

18-
paypal_client: PaypalserversdkClient = PaypalserversdkClient(
18+
paypal_client: PaypalServersdkClient = PaypalServersdkClient(
1919
client_credentials_auth_credentials=ClientCredentialsAuthCredentials(
2020
o_auth_client_id=os.getenv('PAYPAL_CLIENT_ID'),
2121
o_auth_client_secret=os.getenv('PAYPAL_CLIENT_SECRET')

advanced-integration/v2/server/ruby/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
gem "paypal-server-sdk", "~> 0.5.2"
5+
gem "paypal-server-sdk", "~> 0.6.0"
66
gem "puma", "~> 6.4"
77
gem "rackup", "~> 2.1"
88
gem "sinatra", "~> 4.0"

standard-integration/server/dotnet/PayPalStandardIntegration.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
10-
<PackageReference Include="PayPalServerSDK" Version="0.5.3" />
10+
<PackageReference Include="PayPalServerSDK" Version="0.6.0" />
1111
</ItemGroup>
12-
</Project>
12+
</Project>

standard-integration/server/dotnet/Server.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
using Microsoft.Extensions.DependencyInjection;
88
using Microsoft.Extensions.Hosting;
99
using Microsoft.Extensions.Logging;
10-
using PaypalServerSDK.Standard;
11-
using PaypalServerSDK.Standard.Authentication;
12-
using PaypalServerSDK.Standard.Controllers;
13-
using PaypalServerSDK.Standard.Http.Response;
14-
using PaypalServerSDK.Standard.Models;
10+
using PaypalServerSdk.Standard;
11+
using PaypalServerSdk.Standard.Authentication;
12+
using PaypalServerSdk.Standard.Controllers;
13+
using PaypalServerSdk.Standard.Http.Response;
14+
using PaypalServerSdk.Standard.Models;
1515
using IConfiguration = Microsoft.Extensions.Configuration.IConfiguration;
1616

1717
namespace PayPalAdvancedIntegration;
@@ -79,8 +79,8 @@ public CheckoutController(IConfiguration configuration, ILogger<CheckoutControll
7979
_logger = logger;
8080

8181
// Initialize the PayPal SDK client
82-
PaypalServerSDKClient client = new PaypalServerSDKClient.Builder()
83-
.Environment(PaypalServerSDK.Standard.Environment.Sandbox)
82+
PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()
83+
.Environment(PaypalServerSdk.Standard.Environment.Sandbox)
8484
.ClientCredentialsAuth(
8585
new ClientCredentialsAuthModel.Builder(_paypalClientId, _paypalClientSecret).Build()
8686
)

standard-integration/server/java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
paypal-server-sdk
4747
</artifactId>
4848
<version>
49-
0.5.1
49+
0.6.0
5050
</version>
5151
</dependency>
5252
</dependencies>

standard-integration/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.springframework.web.client.RestTemplate;
1717

1818
import com.paypal.sdk.Environment;
19-
import com.paypal.sdk.PaypalServerSDKClient;
19+
import com.paypal.sdk.PaypalServerSdkClient;
2020
import com.paypal.sdk.authentication.ClientCredentialsAuthModel;
2121
import com.paypal.sdk.controllers.OrdersController;
2222
import com.paypal.sdk.exceptions.ApiException;
@@ -53,8 +53,8 @@ public RestTemplate restTemplate() {
5353
}
5454

5555
@Bean
56-
public PaypalServerSDKClient paypalClient() {
57-
return new PaypalServerSDKClient.Builder()
56+
public PaypalServerSdkClient paypalClient() {
57+
return new PaypalServerSdkClient.Builder()
5858
.loggingConfig(builder -> builder
5959
.level(Level.DEBUG)
6060
.requestConfig(logConfigBuilder -> logConfigBuilder.body(true))
@@ -75,9 +75,9 @@ public PaypalServerSDKClient paypalClient() {
7575
public class CheckoutController {
7676

7777
private final ObjectMapper objectMapper;
78-
private final PaypalServerSDKClient client;
78+
private final PaypalServerSdkClient client;
7979

80-
public CheckoutController(ObjectMapper objectMapper, PaypalServerSDKClient client) {
80+
public CheckoutController(ObjectMapper objectMapper, PaypalServerSdkClient client) {
8181
this.objectMapper = objectMapper;
8282
this.client = client;
8383
}

standard-integration/server/node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"dependencies": {
7-
"@paypal/paypal-server-sdk": "^0.5.1",
7+
"@paypal/paypal-server-sdk": "^0.6.0",
88
"body-parser": "^1.20.3",
99
"dotenv": "^16.3.1",
1010
"express": "^4.18.2"

standard-integration/server/node/server.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const ordersController = new OrdersController(client);
4242
const createOrder = async (cart) => {
4343
const collect = {
4444
body: {
45-
intent: CheckoutPaymentIntent.CAPTURE,
45+
intent: CheckoutPaymentIntent.Capture,
4646
purchaseUnits: [
4747
{
4848
amount: {
@@ -56,8 +56,9 @@ const createOrder = async (cart) => {
5656
};
5757

5858
try {
59-
const { body, ...httpResponse } =
60-
await ordersController.ordersCreate(collect);
59+
const { body, ...httpResponse } = await ordersController.ordersCreate(
60+
collect
61+
);
6162
// Get more response info...
6263
// const { statusCode, headers } = httpResponse;
6364
return {
@@ -83,8 +84,9 @@ const captureOrder = async (orderID) => {
8384
};
8485

8586
try {
86-
const { body, ...httpResponse } =
87-
await ordersController.ordersCapture(collect);
87+
const { body, ...httpResponse } = await ordersController.ordersCapture(
88+
collect
89+
);
8890
// Get more response info...
8991
// const { statusCode, headers } = httpResponse;
9092
return {

standard-integration/server/php/composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
"require": {
55
"php": "^7.4 || ^8.0",
66
"ext-json": "*",
7-
"paypal/paypal-server-sdk": "0.5.1"
7+
"paypal/paypal-server-sdk": "0.6.0"
88
},
99
"require-dev": {
1010
},
1111
"scripts": {
12-
"start": "php -S localhost:8080 -t src"
12+
"start": [
13+
"Composer\\Config::disableProcessTimeout",
14+
"php -S localhost:8080 -t src"
15+
]
1316
},
1417
"config": {
1518
}

0 commit comments

Comments
 (0)