Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing getMerchantId and setMerchantId in Gateway.php #6

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Add missing getMerchantId and setMerchantId in Gateway.php #6

merged 1 commit into from
Oct 15, 2021

Conversation

PubliAlex
Copy link
Contributor

Hello,

When you try to get default parameters for this gateway, it return an array of 3 things :

    return array(
        'merchantId' => '',
        'certificate' => '',
        'testMode' => false,
    );

But, when you call :

    $gateway->initialize([
        'merchantId' => $merchantId,
        'certificate' => $certificate,
        'testMode' => $testMode,
    ]);

and you debug the gateway variable, you see that the merchantId is empty whereas the certificate is correctly filled.

The reason is that the Gateway.php file have methods to set and get certificate, but not the merchantId. You can add the merchant Id by proving it as options when you call the completePurchase method for example, but it sound more logical to initialise it when you initialize the gateway, like the certificate. And for that, you need the get and set Method in the Gateway class.

Here is the PR that fix this

Best regards,

Add getMerchantId and setMerchantId methods
@damsfx damsfx merged commit 9883732 into Hounddd:master Oct 15, 2021
@damsfx
Copy link
Member

damsfx commented Oct 15, 2021

Many thanks @PubliAlex !

I only have one site using this platform at the moment, but I'm going to set up a test site using Offline.Mall (which you know well) and a provider.
Have you coded or do you know of such a provider for the Mall plugin?

@PubliAlex
Copy link
Contributor Author

Hello @damsfx

I have a private systempay plugin for mall that rely on your repository. It's still WIP but near to be finished. I had to patch your repository to make it works (that's the reason of my PR)

If you want, I can give you a read access to that module to allow you to test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants