Fixes for tests

This commit is contained in:
David Bomba 2025-05-06 15:26:56 +10:00
parent e7f08690b5
commit b7b5b85b89
3 changed files with 7 additions and 10 deletions

View File

@ -225,7 +225,9 @@ class AuthorizeCreditCard implements LivewireMethodInterface
$payment_record['gateway_type_id'] = GatewayType::CREDIT_CARD; $payment_record['gateway_type_id'] = GatewayType::CREDIT_CARD;
$payment_record['transaction_reference'] = $response->getTransId(); $payment_record['transaction_reference'] = $response->getTransId();
$fds_review = $response->getResponseCode(); if(in_array($response->getResponseCode(), [ "4", "253" ])) {
$payment_record['private_notes'] = 'InFDSReview';
}
$payment = $this->authorize->createPayment($payment_record); $payment = $this->authorize->createPayment($payment_record);

View File

@ -61,14 +61,6 @@ class RefundTransaction
// Set the transaction's refId // Set the transaction's refId
$refId = 'ref'.time(); $refId = 'ref'.time();
// $paymentProfile = new PaymentProfileType();
// $paymentProfile->setPaymentProfileId($transaction_details->getTransaction()->getProfile()->getCustomerPaymentProfileId());
// // // set customer profile
// $customerProfile = new CustomerProfilePaymentType();
// $customerProfile->setCustomerProfileId($transaction_details->getTransaction()->getProfile()->getCustomerProfileId());
// $customerProfile->setPaymentProfile($paymentProfile);
$creditCard = new CreditCardType(); $creditCard = new CreditCardType();
$creditCard->setCardNumber($creditCardNumber); $creditCard->setCardNumber($creditCardNumber);
$creditCard->setExpirationDate($creditCardExpiry); $creditCard->setExpirationDate($creditCardExpiry);

View File

@ -157,6 +157,8 @@ class MultiPaymentDeleteTest extends TestCase
$this->assertEquals(162, $invoice->client->fresh()->balance); $this->assertEquals(162, $invoice->client->fresh()->balance);
$this->assertEquals(163, $invoice->client->fresh()->paid_to_date); $this->assertEquals(163, $invoice->client->fresh()->paid_to_date);
sleep(1);
$data = [ $data = [
'amount' => 162.0, 'amount' => 162.0,
'client_id' => $this->encodePrimaryKey($client->id), 'client_id' => $this->encodePrimaryKey($client->id),
@ -289,6 +291,7 @@ class MultiPaymentDeleteTest extends TestCase
], ],
'date' => '2019/12/12', 'date' => '2019/12/12',
]; ];
sleep(1);
$response = $this->withHeaders([ $response = $this->withHeaders([
'X-API-SECRET' => config('ninja.api_secret'), 'X-API-SECRET' => config('ninja.api_secret'),