Custom field with deliveryDestination object added to paypal button
This commit is contained in:
@@ -20,7 +20,7 @@ var CheckoutPage = React.createClass({
|
||||
|
||||
var choosePayment = (
|
||||
<div className="payment-btn">
|
||||
<PaymentSelect />
|
||||
<PaymentSelect deliveryDestination={this.state.deliveryDestination} />
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ var PaymentSelect = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<div className="payment_select">
|
||||
<PaypalButton />
|
||||
<PaypalButton deliveryDestination={this.props.deliveryDestination} />
|
||||
</div>);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -8,7 +8,9 @@ var Router = require('react-router');
|
||||
|
||||
var PaypalButton = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
var deliveryDestination = JSON.stringify(this.props.deliveryDestination);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_xclick" />
|
||||
@@ -30,6 +32,7 @@ var PaypalButton = React.createClass({
|
||||
<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="custom" value={deliveryDestination} type="hidden" />
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user