Skip to content

method OmiseCardList@retrieve use empty key #160

@zhichao-poper

Description

@zhichao-poper

Code like this:

        $omise_id = 'cust_test_111';
        $omise_public = 'pkey_test_111';
        $omise_secret = 'skey_test_111';
        $card_id = 'card_test_111';
        $customer = OmiseCustomer::retrieve($omise_id, $omise_public, $omise_secret);
        $card = $customer->cards()->retrieve($card_id);

$customer->cards() will return new OmiseCardList, and set $publickey & $secretkey to it.

however, it didn't call self::getInstance to set $instances array with keys, when $customer->cards()->retrieve (OmiseCardList@retrieve) , here call self::getResourceKey(), will receive empty or ENV key, not code var key.

Please make sure if this is a bug or a problem with my code.

omise-php 2.17.0
php 8.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions