Skip to content

Releases: code16/laravel-systempay

v3.0.2

Choose a tag to compare

@PatrickePatate PatrickePatate released this 07 Sep 15:03
v3.0.2
f79d573

v3.0.2

Warning

v3.0.0 and v3.0.1 shipped with a broken composer.json: the SystemPaySystempay rename
dropped the full namespace from extra.laravel.providers/aliases, so Laravel's package
auto-discovery silently failed to register the service provider and facade. If you're on
v3.0.0 or v3.0.1, upgrade to v3.0.2.

Fixed

  • Fixed package auto-discovery by restoring the fully-qualified class names in composer.json.

Breaking changes (since v2.1.0)

  • Classes renamed from SystemPay to Systempay (Systempay, Facades\Systempay,
    SystempayServiceProvider, and all Exceptions\* classes). The SystemPay facade alias itself
    is unchanged — only direct class imports need updating.

  • IPN webhook handling consolidated into a WebhookPayload object. validateSignature(),
    isValidPayment(), retrieveOrderAndTransaction(), and retrievePaymentAmountAndCurrency() are
    removed from the facade. Use formatWebhookPayload() instead:

    // Before
    SystemPay::validateSignature($request);
    SystemPay::isValidPayment($request);
    [$orderId, $transId, $uuid] = SystemPay::retrieveOrderAndTransaction($request);
    [$amount, $currency] = SystemPay::retrievePaymentAmountAndCurrency($request);
    
    // After
    $payload = SystemPay::formatWebhookPayload($request);
    $payload->validateSignature();
    $payload->isValidPayment();
    $payload->orderId; $payload->transactionId; $payload->transactionUuid;
    $payload->amount; $payload->currencyCode;
  • Config: REST API password moved under rest. Update your published config/systempay.php:

    // Before
    'password' => env('SYSTEMPAY_REST_API_PASSWORD'),
    
    // After
    'rest' => [
        'password' => env('SYSTEMPAY_REST_API_PASSWORD'),
    ],

Full Changelog: v2.1.0...v3.0.2

v2.1.0

Choose a tag to compare

@PatrickePatate PatrickePatate released this 04 Sep 14:00
7555225

v2.1.0

  • Add cancel(), refund() and cancelOrRefund() to cancel or refund a transaction via the REST API's Transaction/CancelOrRefund Web Service
  • Add getTransaction() to retrieve a transaction's full data via the Transaction/Get Web Service
  • Add SystemPayApiException, thrown when a REST API call fails, exposing the decoded Systempay response via response()
  • Add an optional password config key (REST API password, separate from the signing key), only required to use the new methods above
  • Update README with usage examples for the new methods

Note

These additions are fully backward-compatible: existing form generation and IPN callback handling are unaffected, and password is only needed if you call cancel(), refund(), cancelOrRefund() or getTransaction().


Full Changelog: v2.0.1...v2.1.0

v2.0.0

Choose a tag to compare

@PatrickePatate PatrickePatate released this 03 Sep 15:42
ad6f921

v2.0.0

  • Drop SHA1 signature support entirely; only HMAC-SHA256 is now accepted
  • Remove automatic float-to-cents conversion: callers must pass amounts as integers in the smallest currency unit (e.g. cents)
  • Raise a hard exception when a config block has no key, instead of silently defaulting to an empty string
  • Add retrievePaymentAmountAndCurrency() to extract vads_amount / vads_currency from the IPN callback request
  • Fix the Blade form component's default-button condition
  • Update README and tests to reflect all of the above

Breaking change

Warning

SystemPay::set([]) now takes an integer for the amount key (amount in cents)

Note

Fully dropping SHA1 signature generation / validation, please use SHA256


Full Changelog: v1.0.0...v2.0.0