Hi all,
This is a solution for integrating my app with this payment method (its for some countries of latin america)
There is a jar file library but have no idea how can I integrate it into my App (or how to make a b4a library)
Also, before to start with this solution, I want to ask to you if you see this example as posible to do with b4a
I'm not an advanced java developer yet, but I have some knowledge of b4a
Would appreciate any info
Thanks
Here is the sample of this solution from the documentation:
This is a solution for integrating my app with this payment method (its for some countries of latin america)
There is a jar file library but have no idea how can I integrate it into my App (or how to make a b4a library)
Also, before to start with this solution, I want to ask to you if you see this example as posible to do with b4a
I'm not an advanced java developer yet, but I have some knowledge of b4a
Would appreciate any info
Thanks
Here is the sample of this solution from the documentation:
B4X:
DineroMailAr dineroMailArgentina = new DineroMailAr();
dineroMailArgentina.setTool(Tool.BUTTON);
dineroMailArgentina.setMerchant("[email protected]");
dineroMailArgentina.setSellerName("Dinero Mail Integration");
ArrayList<Product> products = new ArrayList<Product>();
Product p = new Product();
p.setName("Camera Panasonic Lumix Fz35 12.1Mp");
p.setQuantity(1);
p.setAmount(10000);
p.setCurrency(Currency.ARS);
p.setShippingType(ShippingType.NOT_AVAILABLE);
p.setShippingCurrency(Currency.ARS);
products.add(p);
dineroMailArgentina.setProducts(products);
dineroMailArgentina.addPaymentMethod(PaymentMethodAr.ALL);
dineroMailArgentina.setLanguage(Language.EN);
dineroMailArgentina.setChangeQuantity(
ChangeQuantity.NO_MODIFICATION_ALLOWED);
Intent dineroMailIntent = dineroMailArgentina.checkout(this);
dineroMailIntent.putExtra(DineroMail.BUTTON_BACK_PARAM, "Go back to my app");
startActivityForResult(dineroMailIntent, 0);
Capture the callback with onActivityResult:
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (resultCode) {
case DineroMailActivity.RESULT_CANCEL:
Toast.makeText(this, "Action cancel...", Toast.LENGTH_LONG).show();
break;
case DineroMailActivity.RESULT_BACK:
Toast.makeText(this, "Action back...", Toast.LENGTH_LONG).show();
break;
case DineroMailActivity.RESULT_SUCCESS:
Toast.makeText(this, "Action success...", Toast.LENGTH_LONG).show();
break;
case DineroMailActivity.RESULT_ERROR:
Toast.makeText(this, "Action error...", Toast.LENGTH_LONG).show();
break;
}
}