Android Question Adding SDK to B4A project

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi All,

I have this SDK to add in my project.

implementation 'com.payumoney.sdkui:plug-n-play:1.6.0'

I searched gitHub for JAR file to include in libraries folder, but i could not find one.
From their zip project in java i tried to create JAR file but it gives error one after the other
(heap size than android folder than kotlin variable deprecated etc. in command line)

Is there any other way we can add this PnP SDK to B4A project.

Thanks
Juzer
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Thanks DonManfred for the prompt reply.

I had checjed the above AAR file doesn't download.

As per your suggestion I serached for a post from erel for using JavaObject
Do I have to go like this.

B4X:
    Dim PG As JavaObject
    PG.InitializeStatic("com.payumoney.sdkui:plug-n-play:1.6.0")
    PG.RunMethod("start", Array(PG, "your app secret"))

As per their documentation below are the params to be passed.
PayUmoneySdkInitializer.PaymentParam.Builder builder = new
PayUmoneySdkInitializer.PaymentParam.Builder();
builder.setAmount(amount) // Payment amount
.setTxnId(txnId) // Transaction ID
.setPhone(phone) // User Phone number
.setProductName(productName) // Product Name or description
.setFirstName(firstName)

I am wondering where to pass the key and the salt.
Do I make key value pair while invoking start method.

Pls advice.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Pls advice.
Learn Java. You need to initialize a new Builderinstance. Does not look to be complete though. You need to check their Documentation.


The builder creates a PayUmoneySdkInitializer.PaymentParam to which you need to set the hash for the payment. The Hash (messagedigest) is build using the values like salt, appkey and so on. Example in above link.
 
Last edited:
Upvote 0
Top