贝宝立即购买按钮:添加自己的价格是多少? [英] PayPal Buy Now button: Add my own price?

查看:174
本文介绍了贝宝立即购买按钮:添加自己的价格是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格,用户之前将贝宝立即购买按钮填写。该窗体包含的用户名,他们将支付的金额(在一个隐藏字段)这样的信息。

我知道有可能是一种方式使用高级功能的变量的名称变量传递给贝宝,但有没有办法改变的按钮价格是多少?

和我所能做的使用PHP变量呢?

例如:<?code> ITEM_NAME =&LT; PHP $ myitem&GT;

任何意见将是伟大的!谢谢

编辑:表格的要求

 &LT;形式的行动=htt​​ps://www.paypal.com/cgi-bin/webscr方法=后&GT;
&LT;输入类型=隐藏的名字=CMD值=_ S-xclick&GT;
&LT;输入类型=隐藏的名字=hosted_button_idVALUE =XXXX&GT;
&LT;输入类型=形象SRC =htt​​ps://www.paypalobjects.com/en_AU/i/btn/btn_buynowCC_LG.gifBORDER =0NA​​ME =提交ALT =贝宝 - 更安全,更方便网上支付方式&GT;
&所述; IMG ALT =BORDER =0SRC =htt​​ps://www.paypalobjects.com/en_AU/i/scr/pixel.gif宽度=1高度=1&GT;
&LT; /表及GT;


解决方案

如果我理解正确你的问题,你必须把金额隐藏字段的PayPal形式。
例如。

 &LT;输入类型=隐藏的名字=量VALUE =100&GT;
&LT;输入类型=隐藏的名字=currency_ code值=USD&GT;

这个表单会提示贝宝从买家问$ 100

当然,你可以添加自己的变种出现例如。

 &LT;输入类型=隐藏的名字=量VALUE =&LT; PHP的echo $量;?&GT;&GT;

心连心

I have a form that a user fills out prior to reaching the PayPal Buy Now button. The form contains information such as the users name and the amount they will be paying (in a hidden field).

I know there probably is a way to pass the name variable to PayPal using the Advanced Variables feature, but is there a way to alter the buttons price?

And can I do this using PHP variables?

Eg: item_name=<?php $myitem ?>

Any advice would be great! Thanks

EDIT: Form as requested

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXX">
<input type="image" src="https://www.paypalobjects.com/en_AU/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_AU/i/scr/pixel.gif" width="1" height="1">
</form>

解决方案

If I understand correctly your question, you have to put the amount hidden field on paypal form. e.g.

<input type="hidden" name="amount" value="100">
<input type="hidden" name="currency_code" value="USD">

This form will prompt paypal to ask $100 from buyer.

of course you can add your own var there e.g.

<input type="hidden" name="amount" value="<?php echo $amount;?>">

HTH

这篇关于贝宝立即购买按钮:添加自己的价格是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆