Expand my Community achievements bar.

SOLVED

AEM Payment

Avatar

Level 1

Hi Team,

We are trying to Integrated Payment gateway like Stripe,Paypal,Razorpay with aem.We are not getting any documentation for it.But We tried to integrated at that time we got a error for all payment like com.razorpay -- Cannot be resolved. some maven package error how to resolved it.

 

Screenshot (103).png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

The error means that the com.razorpay java package is not available. You need to wrap this third-party jar within your bundle so that they are available at runtime.

 

Check how to do it here:

https://www.linkedin.com/pulse/how-add-third-party-bundle-you-aem-package-veena-vikraman/

 

Hope this helps



Esteban Bustamante

View solution in original post

3 Replies

Avatar

Level 4

Hi @Dineshkumar_J 

 

Please try use the below dependencies, 

 

<dependency>
<groupId>com.razorpay</groupId>
<artifactId>razorpay-java</artifactId>
<version>1.3.8</version>
</dependency>

 

Also make sure you're importing the correct package in your Java files.

 

import com.razorpay.*; 

import com.stripe.Stripe;

import com.paypal.api.payments.*;

 

Thanks,

venkat

Avatar

Correct answer by
Community Advisor

Hi,

 

The error means that the com.razorpay java package is not available. You need to wrap this third-party jar within your bundle so that they are available at runtime.

 

Check how to do it here:

https://www.linkedin.com/pulse/how-add-third-party-bundle-you-aem-package-veena-vikraman/

 

Hope this helps



Esteban Bustamante

Avatar

Level 2

hi @Dineshkumar_J  - The actual reason why this happens is because RazorPay jar is not available at run time. Although, you must have added the dependency in your pom.xml that would have resolved the compile time dependency by adding the jar in your local .m2 directory. Since during deployment AEM could not refer to the RazorPay jar hence you see this error.

To resolve this you need to provide the reference of this external jar to AEM during runtime also. Here are the things that you can follow:

1) Embed this jar in your core module so that it would be embed inside the deployment artifact. 

Refer this link, explains the same  -https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/including-3rd-party-aem-pa... 

2) if this is just for POC then you can also rebuild this jar as OSGI bundle and manually upload to AEM from system console.