Closed jbmatrixSouvik closed 7 months ago
Issue sorted after following the code example in the branch release-verification-rn-0.73 of this repository.
Hi @jbmatrixSouvik, glad to hear you managed to get this issue resolved.
This issue was caused by the fact that you declared the Maven repository to source the dependencies located in @worldpay/access-worldpay-checkout-react-native-sdk/android
in the list of repositories used by the buildscript.
The repositories listed there would typically be used to source buildscript plugins, not projects dependencies, hence why Gradle could not find the com.worldpay.access:access-checkout-react-native-sdk-android-bridge
dependency in your Android app Gradle project.
buildscript {
...
{
repositories {
google()
mavenCentral()
// this repository declaration should not be here
maven { url("$rootDir/../node_modules/@worldpay/access-worldpay-checkout-react-native-sdk/android/") }
}
}
}
Instead you need to add the repository declaration in the list of repositories to be used by your Gradle projects by using the following notation as an example:
allprojects {
repositories {
...
maven { url("$rootDir/../node_modules/@worldpay/access-worldpay-checkout-react-native-sdk/android/") }
...
}
}
Another query I have is I have the url
const accessCheckout= new AccessCheckOut( {baseUrl:'https:.....', clientId:'' }, )
I have the outletId from the dashboard. After this, I just follow the docs. I get the error bodyDoesNotMatchSchema : The json body provided does not match the expected schema worldpay
Also, the same thing happens to the working example in this repo with the url and clientId i am providing. Basically, I want to understand if I amissing any key steps.Thank you for your time for clearing the last issue.
There is a typo in your statement to initialise the AccessCheckout
class; make sure you use merchantId
instead of clientId
I would recommend you follow as well our online integration documentation at https://developer.worldpay.com/docs/access-worldpay/checkout/react-native/card-only to guide you through your integration. We provide different code samples to facilitate the integration of our merchants.
Can you confim if this resolves your issue? Thank you
Yes I will confirm you, after trying the approach thanks a lot. Also, this merchantId is basically the 8 numbers outletId that I can find in the dashboard, if I am correct. Yes, I was following the code examples which helped. I guess const accessCheckout = new AccessCheckout({ baseUrl: 'https://try.access.worldpay.com/', merchantId: 'YOUR_CHECKOUT_ID', }); merchantId: 'YOUR_CHECKOUT_ID', this part is still fully not clear to me, I was using the outletId which have 8 numbers for this. And no sessions were formed.
The merchantId is actually the checkoutId you should have been given during onboarding.
It is NOT in a 8 numbers format, it is a UUID, e.g. 4a254d78-14c6-4bf9-ac55-815aa887a31d
Oh, okay that makes sense. I will give a confirmation after this. Thanks again !!!
Hello again, I followed up as was told but what I am told and confirmed is that we weren't given any uuid which resembles in the previous response. My question how will we get the id, also the only thing we got is PO**. And for a bit more context if I enter the dashboard go to developer tools, I dont see anything regarding the checkout SDK only HPP, my question does the account owner needs to mail worldpay support. Thanks !!!
Hi, yes please ask your account owner to email their contact at Worldpay to progress this forward. I'm not familiar with the Dashboard UI but it may be that you have not been correctly onboarded onto Access and are onboarded only on HPP.
android/build.gradle looks like this buildscript { ext { buildToolsVersion = "34.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "25.1.8937393" kotlinVersion = "1.8.0" } repositories { google() mavenCentral() maven { url("$rootDir/../node_modules/@worldpay/access-worldpay-checkout-react-native-sdk/android/") } }
implementation "com.worldpay.access:access-checkout-react-native-sdk-android-bridge:+"
This is the mainApplication.kt to link the library override fun getPackages(): List =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
packages.add(AccessCheckoutReactPackage())
return packages;
} Issue is after installation and following the [https://developer.worldpay.com/docs/access-worldpay/checkout/react-native]guide.
This is the package.json dependencies": { "@gorhom/bottom-sheet": "^4.6.1", "@react-native-async-storage/async-storage": "^1.21.0", "@react-navigation/bottom-tabs": "^6.5.11", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "@worldpay/access-worldpay-checkout-react-native-sdk": "^2.0.1", "axios": "^1.6.5", "react": "18.2.0", "react-native": "0.73.2",
Is there anything wrong with the installation from my end as can't seem to find the issue