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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Add your merchant credentials to `.env`:
SIMPLEPAY_SANDBOX=true
SIMPLEPAY_HUF_MERCHANT=your_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
```

## Usage
Expand Down Expand Up @@ -528,10 +527,8 @@ Key `.env` variables:
SIMPLEPAY_SANDBOX=true
SIMPLEPAY_HUF_MERCHANT=your_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
SIMPLEPAY_TIMEOUT=600
SIMPLEPAY_LOG_CHANNEL=simplepay
SIMPLEPAY_AUTO_CHALLENGE=true
SIMPLEPAY_GOOGLE_PAY_MERCHANT_ID=your_google_pay_merchant_id
SIMPLEPAY_GOOGLE_PAY_MERCHANT_NAME="Your Shop"
```
Expand All @@ -545,6 +542,8 @@ SIMPLEPAY_USD_MERCHANT=your_usd_merchant_id
SIMPLEPAY_USD_SECRET_KEY=your_usd_secret_key
```

The config file also defines `urls.back` (`SIMPLEPAY_BACK_URL`) and `auto_challenge` (`SIMPLEPAY_AUTO_CHALLENGE`), but the package does not read them, so they have no effect. A payment only uses the `url` you pass to its request, such as `route('simplepay.back')`, and your application handles a 3DS challenge itself: see [Error Handling](#error-handling).

## Logos and Assets

The package includes the official SimplePay merchant logo pack. Publish the assets:
Expand Down
11 changes: 8 additions & 3 deletions config/simplepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@
| URLs
|--------------------------------------------------------------------------
|
| back: The URL where SimplePay redirects the customer after payment.
| ipn: The route name for the IPN webhook endpoint.
| The package does not read these values; they are here for your own use.
|
| back: A place for your own back URL. A payment only uses the URL you
| pass to its request, such as route('simplepay.back').
| ipn: The name of the package's IPN route.
|
*/

Expand Down Expand Up @@ -126,7 +129,9 @@
| Auto Challenge
|--------------------------------------------------------------------------
|
| Automatically handle 3DS challenge flow for AutoPayment transactions.
| Not used: the package does not read this value, so it has no effect.
| SimplePay reports a 3DS challenge as error code 3004 with a redirectUrl,
| and your application sends the customer there.
|
*/

Expand Down
31 changes: 21 additions & 10 deletions examples/en/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ SIMPLEPAY_HUF_MERCHANT=your_huf_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_huf_secret_key
SIMPLEPAY_EUR_MERCHANT=your_eur_merchant_id
SIMPLEPAY_EUR_SECRET_KEY=your_eur_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
SIMPLEPAY_LOG_CHANNEL=simplepay
SIMPLEPAY_TIMEOUT=600
SIMPLEPAY_GOOGLE_PAY_MERCHANT_ID=your_google_pay_merchant_id
Expand Down Expand Up @@ -75,19 +74,26 @@ return [
| sandbox setting. You typically don't need to change these.
|
*/
'api_url' => env('SIMPLEPAY_API_URL', 'https://secure.simplepay.hu/payment/v2'),
'sandbox_api_url' => env('SIMPLEPAY_SANDBOX_API_URL', 'https://sandbox.simplepay.hu/payment/v2'),
'api' => [
'live' => 'https://secure.simplepay.hu/payment',
'sandbox' => 'https://sandbox.simplepay.hu/payment',
'live_securepay' => 'https://securepay.simplepay.hu',
'sandbox_securepay' => 'https://sandbox.simplepay.hu',
],

/*
|--------------------------------------------------------------------------
| Back URL
| URLs
|--------------------------------------------------------------------------
|
| Default URL where customers are redirected after payment.
| Can be overridden per transaction in the PaymentRequest.
| The package does not read these values. `back` is a place for your own
| back URL; `ipn` is the name of the package's IPN route.
|
*/
'back_url' => env('SIMPLEPAY_BACK_URL'),
'urls' => [
'back' => env('SIMPLEPAY_BACK_URL'),
'ipn' => 'simplepay.ipn',
],

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -130,7 +136,7 @@ return [
| Auto Challenge
|--------------------------------------------------------------------------
|
| When enabled, the package automatically handles 3DS challenge flows.
| Not used: the package does not read this value, so it has no effect.
|
*/
'auto_challenge' => env('SIMPLEPAY_AUTO_CHALLENGE', true),
Expand Down Expand Up @@ -186,9 +192,14 @@ The `timeout` value (in seconds) controls how long a payment session remains val

The default value is 600 seconds (10 minutes).

## Auto Challenge
## Unused Settings

Two settings are in the config file, but the package does not read them, so changing them has no effect:

- `urls.back` (`SIMPLEPAY_BACK_URL`): a place for your own back URL. A payment only uses the `url` you pass to its request, such as `route('simplepay.back')`; see [Back URL Handling](back-url.md).
- `auto_challenge` (`SIMPLEPAY_AUTO_CHALLENGE`): the package does not handle a 3DS challenge on its own. SimplePay reports a challenge as error code `3004` with a `redirectUrl`, and your application sends the customer there; see [Card Storage](card-storage.md).

When `auto_challenge` is enabled, the package automatically handles 3D Secure challenge flows during card payments. This is enabled by default and is recommended for most use cases.
Both keys stay in the config file, so an application that reads them itself (for example `config('simplepay.urls.back')`) keeps working.

## Google Pay

Expand Down
35 changes: 20 additions & 15 deletions examples/hu/konfiguracio.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ SIMPLEPAY_HUF_MERCHANT=your_huf_merchant_id
SIMPLEPAY_HUF_SECRET_KEY=your_huf_secret_key
SIMPLEPAY_EUR_MERCHANT=your_eur_merchant_id
SIMPLEPAY_EUR_SECRET_KEY=your_eur_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
SIMPLEPAY_LOG_CHANNEL=simplepay
SIMPLEPAY_TIMEOUT=600
SIMPLEPAY_GOOGLE_PAY_MERCHANT_ID=your_google_pay_merchant_id
Expand Down Expand Up @@ -71,25 +70,30 @@ return [
| API URLs
|--------------------------------------------------------------------------
|
| The sandbox and live API URLs of SimplePay.
| The package selects the API URL by the sandbox setting.
| Usually there is no need to change them.
|
*/
'urls' => [
'sandbox' => 'https://sandbox.simplepay.hu/payment/v2',
'live' => 'https://secure.simplepay.hu/payment/v2',
'api' => [
'live' => 'https://secure.simplepay.hu/payment',
'sandbox' => 'https://sandbox.simplepay.hu/payment',
'live_securepay' => 'https://securepay.simplepay.hu',
'sandbox_securepay' => 'https://sandbox.simplepay.hu',
],

/*
|--------------------------------------------------------------------------
| Back URL
| URLs
|--------------------------------------------------------------------------
|
| The default back URL where the customer arrives after the
| payment. You can override it in the PaymentRequest.
| The package does not read these values. `back` is a place for your own
| back URL; `ipn` is the name of the package's IPN route.
|
*/
'back_url' => env('SIMPLEPAY_BACK_URL'),
'urls' => [
'back' => env('SIMPLEPAY_BACK_URL'),
'ipn' => 'simplepay.ipn',
],

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -132,7 +136,7 @@ return [
| Auto Challenge (3DS)
|--------------------------------------------------------------------------
|
| Automatic 3D Secure challenge request.
| Not used: the package does not read this value, so it has no effect.
|
*/
'auto_challenge' => env('SIMPLEPAY_AUTO_CHALLENGE', true),
Expand Down Expand Up @@ -206,13 +210,14 @@ SIMPLEPAY_TIMEOUT=900 # 15 minutes

Ez azt jelenti, hogy a vásárlónak ennyi ideje van befejezni a fizetést a SimplePay oldalán.

## Auto challenge (3DS)
## Nem használt beállítások

Az `auto_challenge` beállítás szabályozza, hogy a package automatikusan kéri-e a 3D Secure hitelesítési kivételt. Alapértelmezetten be van kapcsolva:
Két beállítás szerepel a konfigurációs fájlban, de a package nem olvassa őket, ezért a módosításuknak nincs hatása:

```env
SIMPLEPAY_AUTO_CHALLENGE=true
```
- `urls.back` (`SIMPLEPAY_BACK_URL`): hely a saját back URL-ednek. Egy fizetés csak azt a címet használja, amelyet a kérés `url` paraméterében átadsz, például `route('simplepay.back')`; lásd [Back URL kezelése](visszaterites.md).
- `auto_challenge` (`SIMPLEPAY_AUTO_CHALLENGE`): a package nem kezeli magától a 3DS challenge-et. A SimplePay a challenge-et `3004`-es hibakóddal és egy `redirectUrl` címmel jelzi, a vásárlót az alkalmazásod irányítja oda; lásd [Kártyatárolás](kartya-tarolas.md).

Mindkét kulcs a konfigurációs fájlban marad, így az az alkalmazás, amelyik maga olvassa őket (például `config('simplepay.urls.back')`), továbbra is működik.

## Google Pay

Expand Down
4 changes: 2 additions & 2 deletions resources/boost/skills/simplepay-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,16 @@ SIMPLEPAY_HUF_MERCHANT=merchant_id
SIMPLEPAY_HUF_SECRET_KEY=secret_key
SIMPLEPAY_EUR_MERCHANT=eur_merchant_id
SIMPLEPAY_EUR_SECRET_KEY=eur_secret_key
SIMPLEPAY_BACK_URL=https://yourdomain.com/payment/back
SIMPLEPAY_TIMEOUT=600
SIMPLEPAY_LOG_CHANNEL=simplepay
SIMPLEPAY_AUTO_CHALLENGE=true
SIMPLEPAY_GOOGLE_PAY_MERCHANT_ID=google_pay_merchant_id
SIMPLEPAY_GOOGLE_PAY_MERCHANT_NAME="Shop name"
```

Multi-currency: configure separate merchant credentials per currency (HUF, EUR, USD).

The config file also defines `urls.back` (`SIMPLEPAY_BACK_URL`) and `auto_challenge` (`SIMPLEPAY_AUTO_CHALLENGE`), but the package does not read them: pass the back URL as `url` on each request, and handle a 3DS challenge (error code 3004, `redirectUrl`) in the application.

Publish config with: `php artisan vendor:publish --tag=simplepay-config` (or `--tag=simplepay` for config and logos).

## Logo and asset publishing
Expand Down