TOPIC:

How befour submit add new code for paypal buttom 1 week 6 days ago #243779

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9255
  • Karma: 167
  • Thanks: 744
Ok, I think I know what is going on:

As I explained earlier, please put the action "ff_validate_submit" on your custom submit button.

Please see that button's advanced tab => scroll down to action script => click "library" => check "click" and select "ff_validate_submit".

If somebody then chooses Bank Transfer or Cash, the button will submit the form.

Regards,
Markus

Please Log in or Create an account to join the conversation.

How befour submit add new code for paypal buttom 1 week 6 days ago #243782

  • Topic Author
  • alaa1951gm@gmail.com
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 31
  • Thanks: 0
sir plz check

i do that



Ok, please do this:

In the form piece, you have this piece of code
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
ff_validate_submit();
JQuery('#paypalbutton').css('display', 'none');
bfToggleFields('on','section','regular_submit_button',bfDeactivateField);
});
}

Please change it so it looks exactly like this
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {

console.log('Order Approve:');
console.log(details);

//ff_validate_submit();
//JQuery('#paypalbutton').css('display', 'none');
//bfToggleFields('on','section','regular_submit_button',bfDeactivateField);
});
}

Then before paying, right click on the screen and choose "inspect", then open the "console" tab. I want to track what details returns.

Then pay normally with a paypal account and copy the text in the "console" you see underneath "Order Approve:" and paste it somewhere for later.

Then pay with credit card and do the same.

Then post both texts in your next reply.

Then revert your code back to what it was.

Once I see what it returns, we can basically decide what happens when.

for both button form not submit

and this resal fom both case

File Attachment:

File Name: orderaprov...6-29.txt
File Size:5 KB

File Attachment:

File Name: orderaprov...6-29.txt
File Size:5 KB
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by alaa1951gm@gmail.com.

How befour submit add new code for paypal buttom 1 week 6 days ago #243784

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9255
  • Karma: 167
  • Thanks: 744
Hi,

ok, I just submitted successfully, looks fine to me.
Or is there still a problem?

Regards,
Markus

Please Log in or Create an account to join the conversation.

How befour submit add new code for paypal buttom 1 week 5 days ago #243801

  • Topic Author
  • alaa1951gm@gmail.com
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 31
  • Thanks: 0
Thank you very much

For your great support

I want if the payment is successful
The form should be submitted automatically

When choosing to pay by both ways
paypal-button
or
Debit or Credit button

in the start was only happening properly with the paypal-button but not whith Debit or Credit button

But as I explained to you previously
Payment is made with (Debit or Credit Card button)payment done

But here the form was not submite and therefore I do not have any information about the customer even though the payment was made

When you cancel the automatic application now, the customer returns after payment to the form

He does not understand what happened, whether the payment was made or not

He asks what should I do

Do I have to press the payment button again or what should I do or submite

I hope I explained it well and you understood what I wanted


Please help me
If that requires me to pay you for doing so,
please let me know

I will pay immediately

Thank you

Please Log in or Create an account to join the conversation.

How befour submit add new code for paypal buttom 1 week 5 days ago #243821

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9255
  • Karma: 167
  • Thanks: 744
Hi,

I really need to test that somehow.
Can't you setup a sandbox account for this? I am not sure I want to send real money around.

The problem as it seems is that paypal does not call the onApprove function when using credit card, and from your last txt files I couldn't see a difference between normal paypal and credit card payments.

I think I will need to test this a lot and for this sandbox is the best way to go.

Then I can set it up properly from the getgo and it will work quicker than sending messages back and forth.

Regards,
Markus

Please Log in or Create an account to join the conversation.

How befour submit add new code for paypal buttom 1 week 5 days ago #243836

  • Topic Author
  • alaa1951gm@gmail.com
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 31
  • Thanks: 0
Thanks Mr Markus


this is the code for boutm form sand box account


<div id="paypal-button-container"></div>
<script src=" www.paypal.com/sdk/js?client-id=sb¤cy=USD " data-sdk-integration-source="button-factory">
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'buynow',

},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '1'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!