This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
export SHELL=/usr/bin/zsh | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/deepu/.oh-my-zsh" | |
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.zsh_history | |
HISTSIZE=5000 | |
SAVEHIST=5000 | |
setopt autocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"applications": [ | |
{ | |
"config": { | |
"baseName": "store", | |
"applicationType": "gateway", | |
"packageName": "com.jhipster.demo.store", | |
"packageFolder": "com/jhipster/demo/store", | |
"serviceDiscoveryType": "no", | |
"authenticationType": "jwt", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application { | |
config { | |
baseName store | |
applicationType gateway | |
packageName com.jhipster.demo.store | |
serviceDiscoveryType no | |
authenticationType jwt | |
prodDatabaseType postgresql | |
cacheProvider hazelcast | |
buildTool gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const payment = await request.show(); | |
// This payment method handles everything and returns a final result | |
if (payment.details.bobpay_token_id) { | |
await payment.complete("success"); | |
window.location.href = "/result/success"; | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone this repo | |
$ git clone https://github.com/deepu105/payment-request-api-example | |
$ cd payment-request-api-example | |
# Install dependencies | |
$ npm install | |
# create a file named `.env` with values `API_KEY="your_Adyen_API_key"` and `MERCHANT_ACCOUNT="your_Adyen_merchant_account"` | |
$ vi .env | |
# start application | |
$ npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkout() { | |
try { | |
const adyenPaymentMethods = await callServer("/api/getPaymentMethods"); | |
// create a new payment request | |
const request = new PaymentRequest(buildSupportedPaymentMethodData(adyenPaymentMethods), buildShoppingCartDetails()); | |
// show payment sheet | |
const payment = await request.show(); | |
// Here we would process the payment. | |
const response = await callServer("/api/initiatePayment", { | |
// This works only for PCI compliant credit card payments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkout() { | |
try { | |
const adyenPaymentMethods = await callServer("/api/getPaymentMethods"); | |
// create a new payment request | |
const request = new PaymentRequest(buildSupportedPaymentMethodData(adyenPaymentMethods), buildShoppingCartDetails()); | |
// payment logic goes here | |
} catch (error) { | |
console.error(error); | |
alert(`Error occurred: ${error.message}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>E-commerce applications are the backbone of today's online shopping world. In this post, we will see how to build an e-commerce application easily using Java, JHipster, Spring Boot, and React. Since we will be scaffolding the application, the post will focus on how to build a shopping cart and payment integration rather than how to build a Java web application.</p> | |
<h2 id="tools-and-technology-we-will-use">Tools and technology we will use</h2> | |
<p>We will use the below tools and technology to build this application:</p> | |
<ul> | |
<li><a href="https://www.jhipster.tech/"><strong>JHipster</strong></a>: JHipster is a rapid application development platform. It can quickly create web applications and microservices with production-grade code. Head over to the <a href="https://www.jhipster.tech/installation/">installation instructions</a> to set it up. JHipster can scaffold applications with a wide variety of languages, frameworks, and configurations. For this tutorial, we will stick with the following major option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ADYEN_API_KEY=yourAdyenApiKey | |
export ADYEN_MERCHANT_ACCOUNT=yourAdyenMerchantAccount | |
export ADYEN_ORIGIN_KEY=yourAdyenOriginKeyForCorrectDomain |
NewerOlder