[ 'Payer ID' => 'S856CN296A3NY', 'Payer Email' => 'ms.karlotta@gmail.com', 'Payer Status' => 'unverified', 'Payer Address Status' => 'confirmed', 'Merchant Protection Eligibility' => 'Eligible', 'Last Correlation ID' => '4daa479620025', 'Last Transaction ID' => '9L903472H6583463Y', ], ]); expect($rows)->toHaveCount(7) ->and($rows[0])->toMatchArray([ 'label' => trans('paypal::app.order.payer-id'), 'value' => 'S856CN296A3NY', ]) ->and($rows[1]['value'])->toBe('ms.karlotta@gmail.com') ->and($rows[6]['value'])->toBe('9L903472H6583463Y'); }); it('falls back to paypal_* keys when the labeled paypal map is missing', function () { $rows = PaypalPaymentDetails::rows([ 'paypal_payer_id' => 'S856CN296A3NY', 'paypal_payer_email' => 'ms.karlotta@gmail.com', 'last_trans_id' => '9L903472H6583463Y', 'asteria_payment_id' => 99, ]); expect(collect($rows)->pluck('value')->all())->toBe([ 'S856CN296A3NY', 'ms.karlotta@gmail.com', '9L903472H6583463Y', ]); }); it('should display paypal additional payment details on the admin order view', function () { $order = Order::factory()->create(); OrderPayment::factory()->create([ 'order_id' => $order->id, 'method' => 'paypal_standard', 'additional' => [ 'magento_method' => 'paypal_express', 'last_trans_id' => '9L903472H6583463Y', 'paypal' => [ 'Payer ID' => 'S856CN296A3NY', 'Payer Email' => 'ms.karlotta@gmail.com', 'Payer Status' => 'unverified', 'Payer Address Status' => 'confirmed', 'Merchant Protection Eligibility' => 'Eligible', 'Last Correlation ID' => '4daa479620025', 'Last Transaction ID' => '9L903472H6583463Y', ], ], ]); $this->loginAsAdmin(); get(route('admin.sales.orders.view', $order->id)) ->assertOk() ->assertSeeText(trans('paypal::app.order.payer-id')) ->assertSeeText('S856CN296A3NY') ->assertSeeText('ms.karlotta@gmail.com') ->assertSeeText('unverified') ->assertSeeText('Eligible') ->assertSeeText('4daa479620025') ->assertSeeText('9L903472H6583463Y'); });