AEM Payment | Community
Skip to main content
February 20, 2024
Solved

AEM Payment

  • February 20, 2024
  • 3 replies
  • 1254 views

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.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

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

3 replies

Level 4
February 20, 2024

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

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 20, 2024

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
Level 2
February 20, 2024

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-package-for-cloud-manager-build/td-p/445201 

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.