PayPal: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[file:PayPal.jpg]]
[[file:PayPal.jpg]]


'''Description'''
== Description ==


The PayPal control allows you to collect money from PayPal for sales, subscriptions and donations. PayPal is available in many countries. It’s much easier to set up and use than a credit card.
The PayPal control allows you to collect money from PayPal for sales, subscriptions and donations. PayPal is available in many countries. It’s much easier to set up and use than a credit card.
Line 13: Line 13:
[[file:PayPalDesc.jpg]]
[[file:PayPalDesc.jpg]]


At runtime, the PayPal button will open the PayPal web page (replacing your app) and get the payment information from the customer. When the transaction is complete, PayPal will open the Return URL page that you specified when you set up the PayPal button on their system. If you give the pathname to your app, it will be opened. Check the [[location]] value to get the query string in the PayPal open page command.


'''Properties'''
== Properties ==


{| class = "wikitable"
{| class = "wikitable"
|-
|-
| ''hostedButtonID'' || The ID number assigned by PayPal.
| hostedButtonID || The ID number assigned by PayPal.
|-
| image || Location of image, if other than default. Do not add files to /nsb.
|-
|-
| TransactionType || Buy, Donate, Subscribe or Unsubscribe. Kind of PayPal transaction. Determines which icon appears.
| TransactionType || Buy, Donate, Subscribe or Unsubscribe. Kind of PayPal transaction. Determines which icon appears.
|-
|-
| addField(field,value) || Additional fields to send to PayPal. Both are strings Examples of fields are “item_name”, “item_number”,”custom”, where "custom" is a valid PayPal user defined field that is ultimately passed to the Instant Payment Notification server script.
| addField(field,value) || Additional fields to send to PayPal. Both are strings Examples of fields are “item_name”, “item_number”,”custom”, where "custom" is a valid PayPal user defined field that is ultimately passed to the Instant Payment Notification server script. This is a runtime function.
|}
|}


'''Events'''
== Events ==


Standard events are supported.
Standard [[events]] are supported.


'''Example'''
== Example ==


<pre>
<pre>
Line 35: Line 38:
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 41: Line 44:
</pre>
</pre>


'''Related Items'''
== Related Items ==
 
[[adsense|AdSense]]
 
[[Category:Language Reference]]
 
[[Category:Controls]]


[[adsense|ADSENSE]]
[[Category:General]]

Latest revision as of 19:46, 6 April 2015

Description

The PayPal control allows you to collect money from PayPal for sales, subscriptions and donations. PayPal is available in many countries. It’s much easier to set up and use than a credit card.

First, set yourself up as a PayPal Merchant. Assuming you already have a PayPal account, go to the Merchant Services tab on the main screen. On the left, you will see a tab called “Website Payments Standard”. Click on that and follow the instructions.

Once you are set up as a merchant, you will need to set up your product. The easiest way to do that is on the Merchant Services page: Choose the “Buy Now button” option. Enter a number of fields, including item name, item ID (a reference number for your own use), price, currency (21 choices!), shipping and tax info. Once complete, click on ‘Create Button’.

It will go to a new page, showing the code for the button. You’re interested in the string just after “value=”. In this case, it is “ZB9QQKBKK7XYE”. Copy into hostedButtonID in the control’s properties.

At runtime, the PayPal button will open the PayPal web page (replacing your app) and get the payment information from the customer. When the transaction is complete, PayPal will open the Return URL page that you specified when you set up the PayPal button on their system. If you give the pathname to your app, it will be opened. Check the location value to get the query string in the PayPal open page command.

Properties

hostedButtonID The ID number assigned by PayPal.
image Location of image, if other than default. Do not add files to /nsb.
TransactionType Buy, Donate, Subscribe or Unsubscribe. Kind of PayPal transaction. Determines which icon appears.
addField(field,value) Additional fields to send to PayPal. Both are strings Examples of fields are “item_name”, “item_number”,”custom”, where "custom" is a valid PayPal user defined field that is ultimately passed to the Instant Payment Notification server script. This is a runtime function.

Events

Standard events are supported.

Example

PayPal1.addField("custom","my custom string")

Output

(the PayPal payment screen appears)

Related Items

AdSense