I have an application written in R. I need to integrate it with the following payment method inside the application.
https://github.com/ZarinPal-Lab/
I don’t know how to change these codes and make plugins so that I can integrate my Shiny application with this payment method.
I previously integrate my app with PayPal using the following codes:
actionButton("goButton", label= ui <- fluidPage(tags$script(src="https://www.paypalobjects.com/api/checkout.js"), tags$script("paypal.Button.render({
// Configure environment
env: 'sandbox',
client: {
sandbox: 'demo_sandbox_client_id',
production: 'demo_production_client_id'
},
// Customize button (optional)
locale: 'en_US',
style: {
size: 'small',
color: 'gold',
shape: 'pill',
},
// Set up a payment
payment: function (data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '0.01',
currency: 'USD'
}
}]
});
},
// Execute the payment
onAuthorize: function (data, actions) {
return actions.payment.execute()
.then(function () {
// Show a confirmation message to the buyer
window.alert('Thank you for your purchase!');
});
}
}, '#goButton');"),
tags$div(id = "goButton"))),
Would you please help me on how to integrate my Shiny app with ZarinPal payment processing?
12-27-2018 09:03 AM
Hi,
Thank you for reaching out to us.
Unfortunately, Authorize.Net does not have any support for applications written in R. And we also do not recognize ZarinPal-lab as an official product.
Is it possible to integrate your product using one of the 6 languages we support (C#, Java, PHP, NodeJS, Ruby, Python) ?
Python seems the most logical choice for this. A resource that might be helpful for this integration: https://cran.r-project.org/web/packages/reticulate/vignettes/calling_python.html
01-24-2019 10:13 PM