Skip to content

Make successURL change backwards compatible, deprecate static interface

Choose a tag to compare

@PunchyRascal PunchyRascal released this 22 Feb 14:54
· 5 commits to master since this release
da1a42a

This release allows you to use the old, deprecated backURL param and the library will automatically convert it to successURL.

Also the static interface has been deprecated:

Instead of

FlexPay::get_purchase_URL("flexpay secret", [...]);

Use:

$brand = Verotel\FlexPay\Brand::create_from_merchant_id(/* Your customer ID */ '9804000000000000');
$flexpayClient = new Verotel\FlexPay\Client(/* shop ID */ 12345, "FlexPay Signature Key", $brand);

$purchaseUrl = $flexpayClient->get_purchase_URL([
    "priceAmount" => 2.64,
    "priceCurrency" => "EUR",
    "description" => "Test purchase",
]);