Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ballerina Paypal Subscriptions connector
# Ballerina PayPal Subscriptions connector

[![Build](https://github.com/ballerina-platform/module-ballerinax-paypal.subscriptions/actions/workflows/ci.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-paypal.subscriptions/actions/workflows/ci.yml)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerinax-paypal.subscriptions.svg)](https://github.com/ballerina-platform/module-ballerinax-paypal.subscriptions/commits/master)
Expand All @@ -14,18 +14,18 @@ The `ballerinax/paypal.subscriptions` package provides a Ballerina connector for

To use the PayPal Subscriptions connector, you must have access to a [PayPal Developer account](https://developer.paypal.com/).

### Step 1: Create a Business Account
### Step 1: Create a business account

1. Open the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard).

![Sandbox accounts](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-paypal.subscriptions/main/docs/setup/resources/sandbox-accounts.png)

3. Create a Business account.
> Note: Some PayPal options and features may vary by region or country; check availability before creating an account.
3. Create a business account.
> **Note:** Some PayPal options and features may vary by region or country; check availability before creating an account.

![Create business account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-paypal.subscriptions/main/docs/setup/resources/create-account.png)

### Step 2: Create a REST API App
### Step 2: Create a REST API app

1. Navigate to the "Apps and Credentials" tab and create a new merchant app.
2. Provide a name for the application and select the Business account created earlier.
Expand All @@ -41,15 +41,15 @@ To use the PayPal Subscriptions connector, you must have access to a [PayPal Dev

To use the `paypal.subscriptions` connector in your Ballerina application, update the `.bal` file as follows:

### Step 1: Import the Module
### Step 1: Import the module

Import the `paypal.subscriptions` module.

```ballerina
import ballerinax/paypal.subscriptions as paypal;
```

### Step 2: Instantiate a New Connector
### Step 2: Instantiate a new connector

1. Create a `Config.toml` file and configure the obtained credentials and URLs:
```toml
Expand All @@ -76,9 +76,9 @@ import ballerinax/paypal.subscriptions as paypal;
}, serviceUrl);
```

### Step 3: Invoke a Connector Operation
### Step 3: Invoke a connector operation

#### Create a Subscription Plan
#### Create a subscription plan

```ballerina
public function main() returns error? {
Expand Down
16 changes: 8 additions & 8 deletions ballerina/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ The `ballerinax/paypal.subscriptions` package provides a Ballerina connector for

To use the PayPal Subscriptions connector, you must have access to a [PayPal Developer account](https://developer.paypal.com/).

### Step 1: Create a Business Account
### Step 1: Create a business account

1. Open the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard).

![Sandbox accounts](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-paypal.subscriptions/main/docs/setup/resources/sandbox-accounts.png)

3. Create a Business account.
> Note: Some PayPal options and features may vary by region or country; check availability before creating an account.
3. Create a business account.
> **Note:** Some PayPal options and features may vary by region or country; check availability before creating an account.

![Create business account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-paypal.subscriptions/main/docs/setup/resources/create-account.png)

### Step 2: Create a REST API App
### Step 2: Create a REST API app

1. Navigate to the "Apps and Credentials" tab and create a new merchant app.
2. Provide a name for the application and select the Business account created earlier.
Expand All @@ -35,15 +35,15 @@ To use the PayPal Subscriptions connector, you must have access to a [PayPal Dev

To use the `paypal.subscriptions` connector in your Ballerina application, update the `.bal` file as follows:

### Step 1: Import the Module
### Step 1: Import the module

Import the `paypal.subscriptions` module.

```ballerina
import ballerinax/paypal.subscriptions as paypal;
```

### Step 2: Instantiate a New Connector
### Step 2: Instantiate a new connector

1. Create a `Config.toml` file and configure the obtained credentials and URLs:
```toml
Expand All @@ -70,9 +70,9 @@ import ballerinax/paypal.subscriptions as paypal;
}, serviceUrl);
```

### Step 3: Invoke a Connector Operation
### Step 3: Invoke a connector operation

#### Create a Subscription Plan
#### Create a subscription plan

```ballerina
public function main() returns error? {
Expand Down
12 changes: 6 additions & 6 deletions ballerina/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To run the tests for this PayPal Subscriptions Ballerina connector, you need:

For more information on obtaining credentials, refer to the [PayPal Developer Documentation](https://developer.paypal.com/api/rest/).

## Test Environments
## Test environments

There are three test environments for running the PayPal Subscriptions connector tests:

Expand All @@ -20,13 +20,13 @@ There are three test environments for running the PayPal Subscriptions connector

You can run tests in either environment. Each group has its own compatible set of tests.

## Running Tests in the Mock Server
## Running Tests in the mock server

To execute tests on the mock server, ensure that the `isLiveServer` configuration is set to `false` or is unset.

You can configure this variable in the `Config.toml` file in the `tests` directory or set it as an environment variable.

### Using a `Config.toml` File
### Using a `Config.toml` file

Create a `Config.toml` file in the `tests` directory with the following content:

Expand All @@ -42,9 +42,9 @@ Then, run the following command to run the tests:
./gradlew clean test
```

## Running Tests Against PayPal Sandbox API
## Running tests against PayPal sandbox API

### Using a `Config.toml` File
### Using a `Config.toml` file

Create a `Config.toml` file in the `tests` directory and add your PayPal sandbox credentials:

Expand All @@ -62,7 +62,7 @@ Then, run the following command to run the tests:
./gradlew clean test
```

## Running Specific Groups or Test Cases
## Running specific groups or test cases

To run only certain test groups or individual test cases, pass the `-Pgroups` property:

Expand Down
1 change: 0 additions & 1 deletion ballerina/tests/docs/ActivateSubscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The `live_active_subscription_tests` group in `tests.bal` requires an active sub
"rel": "approve",
"method": "GET"
},
...
]
}
```
Expand Down
Binary file modified ballerina/tests/docs/resources/paypal-login-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ballerina/tests/docs/resources/sandbox-accounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading