Skip to content

Commit

Permalink
New release 1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Elavarasan Natarajan committed Dec 18, 2018
1 parent 2669062 commit e332f84
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Model/PaymentMethods/AbstractMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
$mageOrder = $payment->getOrder();
$quote = $this->quoteRepository->get($mageOrder->getQuoteId());
$worldPayPayment = $this->worldpaypaymentmodel->loadByPaymentId($quote->getReservedOrderId());
$orderId = '';
if($quote->getReservedOrderId()){
$orderId = $quote->getReservedOrderId();
}else{
$orderId = $mageOrder->getIncrementId();
}
$worldPayPayment = $this->worldpaypaymentmodel->loadByPaymentId($orderId);
$paymenttype = $worldPayPayment->getPaymentType();
if ($this->paymentutils->CheckCaptureRequest($payment->getMethod(), $paymenttype)) {
$this->paymentservicerequest->capture(
Expand Down
3 changes: 2 additions & 1 deletion Plugin/PaymentInformationManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public function aroundSavePaymentInformationAndPlaceOrder(
$orderId = $this->cartManagement->placeOrder($cartId);
} catch (LocalizedException $exception) {
$this->logger->error($exception->getMessage());
throw new CouldNotSaveException(__($exception->getMessage()));
//throw new CouldNotSaveException(__($exception->getMessage()));
throw new CouldNotSaveException(__('Mentioned card details are already saved, try with other card!'),$exception);
} catch (\Exception $exception) {
$this->logger->error($exception->getMessage());
throw new CouldNotSaveException(
Expand Down
Binary file modified Worldpay User Document.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ define(
function (apiresponse) {
var response = JSON.parse(apiresponse);
if(response.length){
if(savedcardlists.length > 0){
for (var key in savedcardlists) {
var method = savedcardlists[key]['method'];
var found = false;
Expand All @@ -136,6 +137,7 @@ define(
filtercards.push(savedcardlists[key]);
}
}
}

for (var responsekey in response) {
var found = false;
Expand Down

0 comments on commit e332f84

Please sign in to comment.