- Removed the
SaferPayLegacy
provider, no replacment. - Removed
PayPal
provider, no replacment. - Dropped support for PHP 7.x versions
- #22 The SaferPay Transaction has been replaced with the new JSON API and therefore the old HTTPS interface SaferPay Transaction class has been renamed to
SaferPayLegacyTransaction
while the newSaferPayTransaction
contains the new code to work with the JSON API. Therefore the class parameters which are required has been changed. The new configuration looks as followed:
'payment' => [
'class' => 'luya\payment\frontend\Module',
'transaction' => [
'class' => 'luya\payment\transactions\SaferPayTransaction',
'terminalId' => '12345678',
'customerId' => '123456',
'username' => 'API_XXXXX_XXXXXXX',
'password' => 'JsonApiPwed..........',
'mode' => 'prod',
]
]
- Run the migrate command, as new migrations are available and required!
- The transaction config is not stored in the payment process anymore, it must be registered in the module instead
'transaction' => []
. - Run the migrate command
./luya migrate
and import command afterwards./luya import
. - Change the payment module class in the config from
luya\payment\Module
toluya\payment\frontend\Module
. Aso register the admin moduleluya\payment\admin\Module
aspaymentadmin
. - Renamed
luya\payment\PaymentProcess
toluya\payment\Pay
. - Register the amount trough
addItem()
,addShipping()
andaddTax()
in order to ensure the totalAmount must be set as well.
$pay = new Pay();
$pay->addItem('Product 1', 1, $amount);
$pay->setOrderId($id);
$pay->setCurrency('CHF');
$pay->setTotalAmount($amount);
$pay->setSuccessLink(['/store/default/success', 'order' => $id]);
$pay->setErrorLink(['/store/default/error', 'order' => $id]);
$pay->setAbortLink(['/store/default/confirm']);
- Included admin module as migrations are stored in the admin
['paymentadmin' => 'luya\payment\admin\Module']
.