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

im in trouble with hyperpay flutter plugin #14

Closed
suhaibAlbdoor opened this issue Apr 2, 2022 · 8 comments
Closed

im in trouble with hyperpay flutter plugin #14

suhaibAlbdoor opened this issue Apr 2, 2022 · 8 comments

Comments

@suhaibAlbdoor
Copy link

[HyperpayPlugin/getCheckoutID] HttpException: 400: {"result":{"code":"200.300.404","description":"invalid or missing parameter","parameterErrors":[{"name":"entityID","value":"my test entityId","message":"is not an allowed parameter"}]},"buildNumber":"01bd52148ce2598807fd43a4d36810f974eb028e@2022-04-01 07:48:59 +0000","timestamp":"2022-04-02 12:23:45+0000","ndc":"5B57484A2A9E90A0DF85D8C86427F6F1.uat01-vm-tx04"}
there is my code:

class TestConfig implements HyperpayConfig {
String creditcardEntityID = 'test entityId';
String madaEntityID = '';
Uri checkoutEndpoint = _checkoutEndpoint;
Uri statusEndpoint = _statusEndpoint;
PaymentMode paymentMode = PaymentMode.test;
}

Uri _checkoutEndpoint = Uri(scheme: 'https', host: _host, path: '/v1/checkouts', queryParameters: {
'currency': 'JOD',
'paymentType': 'DB',
});

@pr-Mais
Copy link
Collaborator

pr-Mais commented Apr 2, 2022

The error is coming from HyperPay's backend, and is indicating one of the parameters you sent in your request isn't allowed, perhaps you need to check with HyperPay support.

@suhaibAlbdoor
Copy link
Author

The error is coming from HyperPay's backend, and is indicating one of the parameters you sent in your request isn't allowed, perhaps you need to check with HyperPay support.

thank you for replying ,
i will check issue with hyper pay support team

@suhaibAlbdoor
Copy link
Author

suhaibAlbdoor commented Apr 4, 2022

The error is coming from HyperPay's backend, and is indicating one of the parameters you sent in your request isn't allowed, perhaps you need to check with HyperPay support.
@pr-Mais
i contacted with hyper pay support and we figured out that the problem not from backend side
can you show me how to send parameters to the backend side using this package?

@pr-Mais
Copy link
Collaborator

pr-Mais commented Apr 4, 2022

Future<void> initPaymentSession(
BrandType brandType,
double amount,
) async {
CheckoutSettings _checkoutSettings = CheckoutSettings(
brand: brandType,
amount: amount,
headers: {},
additionalParams: {
'merchantTransactionId': '#123456',
},
);
hyperpay.initSession(checkoutSetting: _checkoutSettings);
sessionCheckoutID = await hyperpay.getCheckoutID;
}

@suhaibAlbdoor
Copy link
Author

@>

Future<void> initPaymentSession(
BrandType brandType,
double amount,
) async {
CheckoutSettings _checkoutSettings = CheckoutSettings(
brand: brandType,
amount: amount,
headers: {},
additionalParams: {
'merchantTransactionId': '#123456',
},
);
hyperpay.initSession(checkoutSetting: _checkoutSettings);
sessionCheckoutID = await hyperpay.getCheckoutID;
}

@suhaibAlbdoor
Copy link
Author

@pr-Mais
i mean where to send
1)entityId
2)amount
3)payment type
4) currency
in your package code , i do not know where to add this necessary params also where to add access token

@suhaibAlbdoor suhaibAlbdoor reopened this Apr 5, 2022
@suhaibAlbdoor
Copy link
Author

@pr-Mais

i mean where to send
1)entityId
2)amount
3)payment type
4) currency
in your package code , i do not know where to add this necessary params also where to add access token

@pr-Mais
Copy link
Collaborator

pr-Mais commented Apr 5, 2022

Check the example app I posted above, all additional parameters can be sent in additionalParams. Entity IDs are configured as part of your HyperpayConfig
https://github.com/nyartech/hyperpay/blob/main/example/lib/constants.dart

The plugin currently only supports Credit Cards (Master, VISA) and MADA entities.

@pr-Mais pr-Mais closed this as completed Apr 5, 2022
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

No branches or pull requests

2 participants