Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

paypal text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    paypal text

    I'm trying to add this paypal text to a column in a grid
    I need to have alpha put in variables ( from the list on the left in the screenshot)to where it says test and 123 and 456 in the text.
    can this be done?
    Eric

    #2
    Re: paypal text

    Ive done it in a Custom Field if that helps. The line with "Data.Startingprice" is the variable insert. If I may mention, this approach is only correct if you expect everyone to buy only ONE item from your product list. If you expect or want them to buy more than one, your link here should send the item to a 'cart' and then use paypal to purchase the whole cart at once.

    HTML Code:
    lst = <<%html%
    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="business"      value="[email protected]">
    <input type="hidden" name="notify_url"    value="http://www.alphatogo.com/paypal_response.a5w">
    <input type="hidden" name="cmd"           value="_cart">
    <input type="hidden" name="upload"		 value="1">
    <input type="hidden" name="return"        value="http://www.alphatogo.com/paypal_pmts.a5w">
    <input type="hidden" name="cancel_return" value="http://www.alphatogo.com/paypal_pmtc.a5w">
    <input type="hidden" name="hosted_button_id" value="5222">
    <input type="hidden" name="custom"     	 value="9fece10477af4190858521e7b8c595de">
    <input type="hidden" name="item_name_1"   value="DBF Version - Web Application Framework for Alpha Five V10+">
    %html%
    lst = lst + "<input type=\"hidden\" name=\"amount_1\"      value=\""+Data.Startingprice+"\">"
    lst = lst + <<%html%
    <input type="hidden" name="item_number_1" value="WT2                 ">
    <input type="hidden" name="quantity_1"    value="1">
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" alt="PayPal - The safer, easier way to pay online">
    <img height=1 alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width=1 border=0 >
    </form> 
    %html%
    
    Sale_render = lst
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: paypal text

      Have you tried inserting the placeholders and gotten poor/unexpected results? You should be able to just type the placeholder that you want, where you want it, or put your cursor where you want to insert, and double-click the placeholder.
      -Steve
      sigpic

      Comment


        #4
        Re: paypal text

        Hey Steve Wood,

        I modified your text and got it to work with 4 variables

        Can you explain the x basic that you used

        It still needs some work

        Eric

        Comment


          #5
          Re: paypal text

          this the code i put in and these are the errors I got

          Eric

          lst = <<%html%
          <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
          <input type="hidden" name="cmd" value="_cart">
          <input type="hidden" name="business" value="[email protected]">
          <input type="hidden" name="lc" value="AU">
          <input type="hidden" name="item_name" value="Data.Description">
          <input type="hidden" name="item_number" value="Data.Stock_no">
          <input type="hidden" name="amount" value="Data.Web_price">
          <input type="hidden" name="currency_code" value="AUD">
          <input type="hidden" name="button_subtype" value="products">
          <input type="hidden" name="no_note" value="0">
          <input type="hidden" name="shipping" value="10">
          <input type="hidden" name="add" value="1">
          <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest">
          <input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
          <img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
          </form>

          %html%

          Sale_render = lst

          Comment


            #6
            Re: paypal text

            this is the code I used and these are the errors that I got

            Eric

            lst = <<%html%
            <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_cart">
            <input type="hidden" name="business" value="[email protected]">
            <input type="hidden" name="lc" value="AU">
            <input type="hidden" name="item_name" value="Data.Description">
            <input type="hidden" name="item_number" value="Data.Stock_no">
            <input type="hidden" name="amount" value="Data.Web_price">
            <input type="hidden" name="currency_code" value="AUD">
            <input type="hidden" name="button_subtype" value="products">
            <input type="hidden" name="no_note" value="0">
            <input type="hidden" name="shipping" value="10">
            <input type="hidden" name="add" value="1">
            <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest">
            <input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
            <img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
            </form>

            %html%

            Sale_render = lst

            Comment


              #7
              Re: paypal text

              You didn't write it the way I showed it. Note the different syntax on this line from my code:

              lst = lst + "<input type=\"hidden\" name=\"amount_1\" value=\""+Data.Startingprice+"\">"
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: paypal text

                do i need to do that for all 4 variables?

                Eric

                Comment


                  #9
                  Re: paypal text

                  Yes of course. But here is a cleaner method to insert the variable where they belong. See notes underneath the code.

                  Code:
                  vAmount = Data.Amount
                  vItemNo = Data.ItemNO
                  vItemName = Data.ItemName
                  
                  lst = <<%html%
                  <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                  <input type="hidden" name="cmd" value="_cart">
                  <input type="hidden" name="business" value="[email protected]">
                  <input type="hidden" name="lc" value="AU">
                  <input type="hidden" name="item_name" value="{vItemName}">
                  <input type="hidden" name="item_number" value="{vItemNo}">
                  <input type="hidden" name="amount" value="{vAmount}">
                  <input type="hidden" name="currency_code" value="AUD">
                  <input type="hidden" name="button_subtype" value="products">
                  <input type="hidden" name="no_note" value="0">
                  <input type="hidden" name="shipping" value="10">
                  <input type="hidden" name="add" value="1">
                  <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest">
                  <input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
                  <img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
                  </form>
                  %html%
                  
                  lst = evaluate_string(lst)
                  
                  MYFIELD_render = lst
                  The first step transfers the values in the DATA pointer to local variables. The second section defines the HTML to send to Paypal. Note that I put the local variables in curly brackets where they belong. The evaluate_string() function will replace the variable (in the curly brackets) with their values.

                  This is cleaner than my first example.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: paypal text

                    I've changed the code to this to accomodate the names of my variables is that right

                    Am I correct in choosing "Custom" as the control type and putting this code in the "defintion" section.

                    vAmount = Data.Web_price
                    vItemNo = Data.Stock_no
                    vItemName = Data.Description

                    lst = <<%html%
                    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                    <input type="hidden" name="cmd" value="_cart">
                    <input type="hidden" name="business" value="[email protected]">
                    <input type="hidden" name="lc" value="AU">
                    <input type="hidden" name="item_name" value="{vItemName}">
                    <input type="hidden" name="item_number" value="{vItemNo}">
                    <input type="hidden" name="amount" value="{vAmount}">
                    <input type="hidden" name="currency_code" value="AUD">
                    <input type="hidden" name="button_subtype" value="products">
                    <input type="hidden" name="no_note" value="0">
                    <input type="hidden" name="shipping" value="10">
                    <input type="hidden" name="add" value="1">
                    <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest">
                    <input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
                    <img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
                    </form>
                    %html%

                    lst = evaluate_string(lst)

                    MYFIELD_render = lst

                    Comment


                      #11
                      Re: paypal text

                      I've got it Steve!

                      I found where to put the code as there is some default code already there in the custom field

                      Thanks so much for your help.

                      The Paypal cart handles the return if the customer wants to continue shopping!

                      What about if I want an "if" argument in there as well.

                      Is that hard to do?

                      Eric

                      Comment


                        #12
                        Re: paypal text

                        Code:
                        The Paypal cart handles the return if the customer wants to continue shopping!
                        Its your application, but that means your poor buyer who wants four items has to go through the PayPal payment process four times, and hopefully he can find the "return to merchant" link on the final payment screen.

                        Code:
                        What about if I want an "if" argument in there as well. Is that hard to do?
                        IF where, to do what? The answer is yes, it just requires adding the proper xbasic to insert an IF statement. But you would probably want to modify your code back closer to my original syntax. See this generic example:

                        Code:
                        dim lst as c
                        lst = lst + "line one" + crlf()
                        lst = lst + "line two" + crlf()
                        if condition = "ABC"
                        	lst = lst + "<input type=\"hidden\" name=\"amount_1\" value=\""+Data.Price_[COLOR="Red"]1[/COLOR]+"\">"
                        	else 
                        	lst = lst + "<input type=\"hidden\" name=\"amount_1\" value=\""+Data.Price_[COLOR="Red"]2[/COLOR]+"\">"
                        end if
                        lst = lst + "line last"
                        
                        myfield_render = lst
                        Steve Wood
                        See my profile on IADN

                        Comment


                          #13
                          Re: paypal text

                          There seems to be a never ending array of features that you can add to an application.

                          What I want to do is have the paypal code (and hence tha paypal button) conditional on there being an amount in the shipping variable. If there is zero in the shipping variable I want the field to display an "email for shipping quote" option if there is a shipping amount it displays the paypal button.

                          The pay pal buttons are great for now - the cart that pops up for this one is easy to get back from to the products page in our app.

                          I have contacted Alpha re a book on xbasic, do you know of any?

                          What would be great would be "how to" examples.

                          Eric

                          Comment


                            #14
                            Re: paypal text

                            You won't find a better book on Xbasic than Dr. Peter Wayne's Xbasic for Everyone.
                            Here is where you can purchase it:
                            http://www.libertymanuals.com/index....&category_id=7

                            Hope this helps.
                            Jay
                            Jay Talbott
                            Lexington, KY

                            Comment


                              #15
                              Re: paypal text

                              I got that Jay Thanks

                              I have alot of reading to do.

                              Eric

                              Comment

                              Working...
                              X