PayPal Smart Payment button don't work with custom currency

rafalz
Contributor
Contributor

Hello,

 

I'm struggling with Smart Payment Button.

I have mobile applications and I'm showing Smart Button at WebView for Android and WkWebView for iOS.

Button is rendering properly, but when I'm using custom currency it stop responding, which mean when I'm clicking on the button nothing happening.

 

Here is a HTML code, which I'm using to render Button at WebView.

 

 

<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>

<body>
<script src="https://www.paypal.com/sdk/js?client-id=MerchantID"></script>
<script>paypal.Buttons({
createOrder: function (data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
currency_code: 'EUR',
value: '2.01'
}
}]
});
}
}).render('body');</script>
</body>

 

 

 

 When I remove currency_code or setup USD then I will get payment popup.

 

I have second question. How can I catch in mobile application that payment is done successfully or not? And Is it possible to setup some parameter in script to showing some info after transaction? Because now after transaction popup just disappear without any information.

Login to Me Too
1 REPLY 1

Chiranjeevi_L
Moderator
Moderator

Hi @rafalz,

 

Thank you for contacting PayPal community.

 

Our sincere apologies for the inconvenience caused.

 

I have tried to reproduce the issue and could able to process the payment flow via smart button integration without any issues.

 

Can you please try now by following the detailed integration guide link.

 

Yes, you can get the payment details by implementing below event notifications.

 

I request to please refer the detailed guide link.

 

The PayPal REST APIs can use webhooks for payment event notification.

 

Thank you so much for your patience and understanding.

 

Sincerely,

Chiranjeevi

PayPal, Inc.

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.