Use PaypalId and ApiUrl from globals
This commit is contained in:
@@ -11,12 +11,16 @@ var PaypalButton = React.createClass({
|
||||
var deliveryDestination = JSON.stringify(this.props.deliveryDestination);
|
||||
var amount = Globals.ConvertToEuro(this.props.amount);
|
||||
var deliveryCost = Globals.ConvertToEuro(this.props.deliveryCost);
|
||||
var notifyUrl = Globals.ApiUrl + "/payment/confirmation";
|
||||
var root = location.protocol + '//' + location.host;
|
||||
var return_url = root + "/hvala_paypal";
|
||||
var cancel_return_url = root + "/odgodjeno";
|
||||
|
||||
return (
|
||||
<div>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_xclick" />
|
||||
<input type="hidden" name="business" value="W7GKS2Q9ZGLGY" />
|
||||
<input type="hidden" name="business" value={Globals.PaypalId} />
|
||||
<input type="hidden" name="lc" value="BA" />
|
||||
<input type="hidden" name="item_name" value="Item name" />
|
||||
<input type="hidden" name="item_number" value="555" />
|
||||
@@ -27,13 +31,13 @@ var PaypalButton = React.createClass({
|
||||
<input type="hidden" name="cn" value="Napomena:" />
|
||||
<input type="hidden" name="no_shipping" value="1" />
|
||||
<input type="hidden" name="rm" value="1" />
|
||||
<input type="hidden" name="return" value="https://www.ribica.ba/hvala_paypal" />
|
||||
<input type="hidden" name="cancel_return" value="https://www.ribica.ba/odgodjeno" />
|
||||
<input type="hidden" name="return" value={return_url} />
|
||||
<input type="hidden" name="cancel_return" value={cancel_return_url} />
|
||||
<input type="hidden" name="shipping" value={deliveryCost} />
|
||||
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted" />
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
|
||||
<input name="notify_url" value="https://ribica.ba/api/payment_confirmation" type="hidden" />
|
||||
<input name="notify_url" value={notifyUrl} type="hidden" />
|
||||
<input name="custom" value={deliveryDestination} type="hidden" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = {
|
||||
return amount.toFixed(2);
|
||||
},
|
||||
MaxNumberOfItemsToBeAdded: 1000,
|
||||
PaypalId: "W7GKS2Q9ZGLGY",
|
||||
|
||||
Slugify: function(text) {
|
||||
return text.toString().toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user