Passing price variable to PayPal with custom button

前端 未结 8 1047
长情又很酷
长情又很酷 2020-12-07 21:26

I have a form and a custom PayPal button, but how do I pass the value/price variable to PayPal?

8条回答
  •  离开以前
    2020-12-07 21:45

    Although an old post, it came across me when searching. And there is nowhere on the first pages that answers the question! Reading for about 10 hours, I managed to make a working example. But remember that paypal is constantly changing, so at some point this solution will not work anymore.

    First things first. You cannot ever have a variable price value for an item. So, the first workaround is to send a request as if the item is a total in your cart! Yep, smart move :)

    
        
        
        
        
        
        
        
        
        
        
        
    
    

    You may want to change the value of business to yours. But I don't really care :)

提交回复
热议问题