Jump to content

a question for Jon Lebensold regarding the paypal form


derrida

Recommended Posts

Hi

first of all i want to thank you for a great video series. i only start to check oop and you made me understand some features i did not understood in any other way. in addition a lot of best practices and clear explanations.

 

i went to paypal and created all the accounts and went to make the buy now button. they change there a lot of things so i tried my best, and made the form. but when i tried to send them the values from the cart the paypal still show the static values i entered when making the form and button.

 

the form i got is this (there is no business hidden field there and i could not see how to make it work):

 

pixel.gif

 

another question i`m not sure if you are the right person to ask: can i use paypal for a site that is not in the USA or UK?

 

best regards

 

derrida

Link to comment
Share on other sites

Here's the code I used to make it work with a full cart of items.

 

Function called:

function render_paypal_checkout(ShoppingCart $shopping_cart)
{
return " 







   ".render_shopping_cart($shopping_cart)."





";
}

 

 

 

Page source of cart before submitting to paypal

>






</pre>
<table>
           Product ID

           Quantity

           Amount

           PASTA


           4


           $15.96



           CUMIN


           2


           $31.98



           TOMATOSOUP



           1


           $1.33




       shipping:
        
       $31.93


       total:
        
       $81.2
</table>
<br><br><br><br><br><img alt="Paypal Checkout" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...