diff --git a/front-ui/app/components/cart/checkoutPage.js b/front-ui/app/components/cart/checkoutPage.js
index b4a00d0..5198444 100644
--- a/front-ui/app/components/cart/checkoutPage.js
+++ b/front-ui/app/components/cart/checkoutPage.js
@@ -8,25 +8,33 @@ var React = require('react'),
CartTotal = require('./cartTotal'),
LinkBanner = require('../linkBanner/linkBanner'),
PaymentSelect = require('../payment/paymentSelect'),
- RibicaFormError = require('../shared/ribicaFormError');
+ RibicaFormError = require('../shared/ribicaFormError'),
+ PaypalButton = require('../payment/paypalButton');
var Router = require('react-router');
var CheckoutPage = React.createClass({
-
render: function() {
-
var choosePayment = (
);
- var last_used_payment = (
-
- );
+ var last_used_payment;
+ if(this.state.deliveryDestination.get('payment_method') == 'paypal' || true) {
+ last_used_payment = (
+
+ );
+ } else if(this.state.deliveryDestination.get('payment_method') == 'pikpay') {
+
+ } else {
+ last_used_payment = (
+
+ );
+ }
var supportedPlaceOptions = CartStore.getSupportedPlaces().map ( function (p) { return ()});
@@ -129,9 +137,7 @@ var CheckoutPage = React.createClass({
Ukupno:
-
- {last_used_payment} ili
-
+ {last_used_payment}
ili
@@ -175,6 +181,11 @@ var CheckoutPage = React.createClass({
CartActions.setAddressColapsed(false);
},
+ _handleOnSubmitPaypal: function(event) {
+ CartActions.changeDeliveryDestinationProperty('payment_method', 'paypal');
+ return false;
+ },
+
getInitialState: function () {
return CartStore.getWholeCartState();
}
diff --git a/front-ui/app/components/payment/paypalButton.js b/front-ui/app/components/payment/paypalButton.js
index 3c30630..5d40447 100644
--- a/front-ui/app/components/payment/paypalButton.js
+++ b/front-ui/app/components/payment/paypalButton.js
@@ -17,8 +17,8 @@ var PaypalButton = React.createClass({
var cancel_return_url = root + "/odgodjeno";
return (
-