Receive data from PayPal

Hello.
Assuming that I send data into PayPal (with the use of  "HTML Variables for PayPal Payments Standard"):
var variables:URLVariables = new URLVariables();
variables.cmd = "_xclick";
variables.business = "A8AJGG5PS2GKE";
variables.upload = "1";
variables.item_name = "some item";
variables.amount = "123";
variables.currency_code = "USD";
variables.lc = "pl";
variables.page_style = "PayPal";
variables.return = "my site";
variables.re = 2;
variables.no_note = 1;
variables.no_shipping = 1;
variables.notify_url = "[email protected]";
var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
request.method = URLRequestMethod.POST;
request.data = variables;
navigateToURL(request, "_blank");
Does anyone managed to integrate PayPal IPN - "Instant Payment Notification"-
(https://www.paypal.com/ipn/) with AS3 in order to receive data from PayPal?
Could you please show any example of using it.

My idea is as follow:
1. .swf on you page sends variables into PayPal
2. After finishing the payment on PayPal, the customer is auto-redirected to your page ("return" variable)
3. Customer returns to your page. PayPal does NOT send any payment data there.
Separately in the background, you receive a form POST from PayPal at a different URL (notify_url variable) - (here resides the php that I added below).
4. You post back a form with cmd=_notify-validate and all fields you received from PayPal. PayPal responds with a single word VERIFIED or INVALID
5. If you receive VERIFIED, you can process payment
This method means that you can easily update for example your MySQL database but unfortunately you have to reload .swf file each time - and that's why it is not a perfect solution in my opinion;
PS:
- variables.return   and variables.notify_url must be absolute urls
- notify_url must also allow anonymous access from outside of your network
- firewall must be opened to host: notify.paypal.com
- in your business PayPal account:
Auto Return = Enabled in account profile
PDT = Disabled in account profile
IPN = Enabled in account profile
- php file:
<?php
// read the post from PayPal system and add 'cmd'
$req = 'cmd=' . urlencode('_notify-validate');
foreach ($_POST as $key => $value) {
        $value = urlencode(stripslashes($value));
        $req .= "&$key=$value";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.paypal.com/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: www.paypal.com'));
$res = curl_exec($ch);
curl_close($ch);
// assign posted variables to local variables
$item_name = $_POST['item_name'];
$item_number = $_POST['item_number'];
$payment_status = $_POST['payment_status'];
$payment_amount = $_POST['mc_gross'];
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
if (strcmp ($res, "VERIFIED") == 0) {
        // process payment
else if (strcmp ($res, "INVALID") == 0) {
        // log for manual investigation
?>

Similar Messages

  • How to use sda6810 to receive data from a rs485 channel?

    I want to use sda6810 to anlyze data from a rs485 bus. So I use Labview to progame the sda6810 with the drivers.Firstly,I intilite the card,then I cofigued an channel to send data from a buffer,and configued another channel to receive data from the first chanel . But unfortunatly the data I received was not equal to the data I sended.And there are not any error messages indicated in Labview
    And when I try to use the GP channel,I found it worked properly.please tell me how I can solve the problem?

    I really apreciate your help.You told me that
    I should use the exameples which shipped with sda driver firstly. I do used them,and it worked correctly.So I think the connections was being setup properly.And I
    used labview to progame the rs485 channel
    . It do received something .But it was incorrect.
    I would be grateful if you could send me an
    example writted by labview,or you could tell
    me you e-mail address.
    Here is my code .
    Attachments:
    youyou2.zip ‏110 KB

  • Partner Profile type : Receiving Data from an 3rd party sys & Posting IDoc

    Hi all,
    My scenario is Receiving Data from a third party system and sending it to a R3 system as an IDoc...
    It is a B2B scenario.....
    So please tell me what should be my Scheme for the indentifier that i will be mentioning in the sender party...
    Should it be ALE#KU or ALE#LS.........
    it is working fine with ALE#KU...i m getting an error if i define it as ALE#LS......
    Is there an extra setting that should be done for configuring it as ALE#LS or , it is not possible configuring using ALE#LS
    Thanks in Advance,
    Sushil H.

    Hi Sushil,
    I have a similar problem and opened a thread: Unable to convert the sender service ABC_Service to an ALE logical system
    i was able to do it without specifying any identifier ...and mapping the sender information in the message mapping,,,,
    Can you please tell me:
    1) What value you specified in the mapping for sender (was it 3rd party/ PI/ R3)? Did you disable the other fields like RCVPRN/ RCVPOR etc?
    2) Did you make any change in the receiver channel for IDOC (in identifier section)?
    It will be very helpful to me if you reply.
    Thank you,
    Pankaj.

  • How do you receive data from multiple people on a single port?

    I am trying to make a server where it receives the data from multiple users and then send it back to them all- multicasting audio to be exact. I tried setting it up but when i open the RTP session i get "can't open local data port" if i have more than one used connected to me. Does anyone have a solution? I didnt find much on the samples page and the multicast example from http://java.sun.com/products/java-media/jmf/2.1.1/apidocs/javax/media/rtp/RTPManager.html
    didnt help either- i used the same ipaddress for the initialize and addtarget but i get "Local Data AddressDoes not belong to any of this hosts local interfaces". I am really in a pickle... If anyone can help me out that would be great!
    EX: If A,B,C want to multicast they will all send to Server S using port 3000. Server S will create listeners for each of them using port 3000 and when received data it will send back to all of them at 4000. This is what i am trying to do... should i make multiple threads? would that help? thanks and please help!

    To send to everyone, you can send to a multicast address (choose one from 224.0.0.0 to 239.255.255.255), on a given port (2000). I don't have any code example here but it should very similar to unicast. As you said, you just have to register the Session and add a target with this same address.
    I don't have any example myself, but you should find code example of both server and client around. It is a very common usage of jmf rtp.
    I don't know how to mix several audio streams together (never had to do this), so I'm afraid I can't answer your other questions, sorry... The only way to know if it will slow down the transmission is to try. :)

  • Port number on which SAP receives data from extrernal systems

    Hi,
    We have an external application which sends/receives data to/from SAP. I am trying to figure out the port on which SAP server getting/sending  data. Every time on SAP server side, the port opened is sapgw01( sapgw<system number>). Can anyone tell how to figure out the correct port on which SAP is operating in this case ?

    Hi
    check the following link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4e515a43-0e01-0010-2da1-9bcc452c280b

  • Receiving mail from PayPal Credit (Don't have a account with PayPal Credit)

    I've been receiving statements though mail from PayPal Credit with a balance of 142.61. I don't have Credit with PayPal so is this some kind of scam? The address is correct except the last name isnt my own and an apartment isnt included. Just my building and street address

     It's probably a spoof/phishing email... don't click on any links in the email messages.  You can obtain PayPal Credit customer support contact information here... https://www.billmelater.com/help/index.xhtml -Sandy  

  • Receive data from serial cable

    hello;
    i am building a program which recive data from serial port... and to tes it i constructed a circuit where i connect the pin 2 to a power source.
    c=inputStream.read();
         readBuffer.append( c);
         System.out.println("ok "+ readBuffer.toString() );
    the prevouse sentence is to print out the result, but the result is numbers ,0,10,255,16,8 collection of numbers at any time i connect the circuit.
    so can any one discuss to me what is these results?

    I agree with Dennis that the timing characteristics of the USB-6008
    would be insufficient to implement a serial interface with, but there
    are other issues as well which would prevent you from doing this.
    RS-232 has a maximum voltage of +/- 25V, which is higher than the
    limits of your device no matter how you connect it.  You may be
    able to read the incoming data line on the analog lines if you use
    differential mode (+/- 20V Range), but you would be unable to output
    any data.  The analog output range is 0-5V, so you wouldn't have
    any way to output the voltage levels needed for a RS-232 interface.
    Both the digital lines and the analog output are software timed, so you
    would not be able to produce the accurately timed I/O needed for a
    RS-232 interface.
    You could overcome the voltage issues by using a line converter such as
    a MAX232 chip to convert between RS-232 and TTL votlage levels, but you
    would still have timing issues which would make it difficult to produce
    a working serial interface.
    I would recommend that you look into purchasing a USB Serial interface.  National Instruments offers a full line of USB Serial Interfaces which allow you to easily interface with RS-232 devices on a computer without a serial port.

  • RS-485: PC can send/receive data from PCI card, but LabVIEW can only send to card.

    I have a master/slave setup with a 2-wire RS-485 connection via a StarTech PCI2S485 card  http://www.startech.com/product/PCI2S485-2-Port-PCI-RS-422-485-Card-with-DB9.  A Vista PC running LabVIEW 2010 is acting as the master to 6 slave devices.  I am running a driver VI supplied by the company that made the slaves. 
    I've used a terminal program called Termite to monitor the ports during operation and have concluded that both the PC and the slaves are sending correct data packets (i.e. correct protocol and reasonable data).  Termite indicates that the slave's response is being received by the PCI card, but the problem is that LabVIEW simply isn't reading the response from the card.  Each time the driver VI is run it returns a "timeout waiting for slave to respond" error.  
    The VI and slaves I am using are designed for both RS-232 and 485 communication.  I've verified the VI to run in 232 mode on a different COM port.  I also wrote a simple VI using the VISA functions to test the ports on the PCI card, but I've had the same results.  Hardware connections have been looked over carefully, but the fact that the card actually sends a correct message and receives a correct message indicates a different problem.
    Any idea why LabVIEW can talk to the PCI card but can't hear it?  Is there anything I can do about this, or does LabVIEW generally not like StarTech's PCI2S485 cards?
    Thanks,
    Tim

    Tim359 ha scritto:
    I have a master/slave setup with a 2-wire RS-485 connection via a StarTech PCI2S485 card  http://www.startech.com/product/PCI2S485-2-Port-PCI-RS-422-485-Card-with-DB9.  A Vista PC running LabVIEW 2010 is acting as the master to 6 slave devices.  I am running a driver VI supplied by the company that made the slaves. 
    I've used a terminal program called Termite to monitor the ports during operation and have concluded that both the PC and the slaves are sending correct data packets (i.e. correct protocol and reasonable data).  Termite indicates that the slave's response is being received by the PCI card, but the problem is that LabVIEW simply isn't reading the response from the card.  Each time the driver VI is run it returns a "timeout waiting for slave to respond" error.  
    The VI and slaves I am using are designed for both RS-232 and 485 communication.  I've verified the VI to run in 232 mode on a different COM port.  I also wrote a simple VI using the VISA functions to test the ports on the PCI card, but I've had the same results.  Hardware connections have been looked over carefully, but the fact that the card actually sends a correct message and receives a correct message indicates a different problem.
    Any idea why LabVIEW can talk to the PCI card but can't hear it?  Is there anything I can do about this, or does LabVIEW generally not like StarTech's PCI2S485 cards?
    Thanks,
    Tim
    RS232 interface consist of 2 indipendent communication crossed lines between 2 devices (9DSub connector: Pin 2-RX  Pin 3-TX pin 5-Gnd)
    RS485 interfaceis a bus, shared between 2 or more devices. (like ethernet or CAN Bus)
    This means that an incorrect use of the bus can lead to a "packet collision" if 2 or more devices try to send a message on the bus at the same time or at least their messages, partially "overlap"
    About 10 years ago I have used a PCI 2 RS485 port: I remember  that I have to change the status of RTS serial control line to switch between transmit and receive mode.
    This can be done using the serial VISA property:
    Serial Settings --> Modem Line Settings --> DTR State
    or using the VI
    <LabVIEW dir>\vi.lib\Instr\_sersup.llb\serial line ctrl.vi   (LV 8.6.1)
    The result was that the slave device connected, send me the response after few nanosec. causing the lost of the answer.
    because LabVIEW use more than some  nanosec. to change RTS property after sending message on the 485 bus calling a VISA Write.
    So for me there was 2 possibilities: 
    - use 2 RS485 port (1 for transmit 1 for receive echo transmit included)
     - use this converter  
             http://www.advantech.com/products/ADAM-4521/mod_2E78D425-8B08-43F6-81B0-1B924E53E075.aspx
     this converter, after sending a message on the bus, electronically switchs back to receive mode without losing a byte.
    But the question is :
    what does it means
    "RS-485 mode supports Auto Transceiver turn around (ATTA)"
    of your card?
    bye

  • Using a TCP/IP Connection to REQUEST and RECEIVE data from a iDRX Signal Conditioner through a EIS-2B Server

    First let me say that I am new to labview, please bear with me.  I want to use Labview to querry a iDRX thermocouple signal conditioner using tcp/ip.  The signal conditioner is wired to a EIS-2B server.  The server is at 198.162.10.53 and port 2000.  The data request command is *10x01\r and the expected data to be returned is 01X01+00064.6 (or whatever the actual temperature is).  The conditioner and server are working and testing correctly using the iDRX supplied software.
    My attached vi runs, creates no errors, but returns no data either.  I can find many examples of how to set up a listener, but I need to QUERRY and then RECEIVE the data.
    Thanks in advance.
    Attachments:
    Alyeska 4.vi ‏15 KB

    Hi Alyeska!  Welcome to the forums!
    I took a quick look at the VI, and I have four quick suggestions for
    you that may give us some information about what is happening.
    You may be experiencing an error that just isn't detected by the VI -
    normally we add an error handling VI at the end of program execution to
    report any errors that occurred.  Also, it's helpful to have a way
    to exit the while loop so that the program can finish executing if an
    error occurs.  Third, you may need to introduce a delay between
    the query and the read command to allow the server time to process and
    respond to the request.  Lastly, if you already know how long the
    return message will be, you should wire this length to the Bytes to
    Read input of the TCP Read VI so it knows to return the data once it
    receives that number of bytes.  I've attached a modified version
    of the VI incorporating these - give this a try, and let us know if you
    still see an error, and if so, what error.  Also, if you haven't
    taken a look at it already, there are excellent resources for learning
    LabVIEW at the LabVIEW Fundamentals page - it's a great way to introduce yourself to LabVIEW and get up to speed quickly.
    Cheers,
    Matt Pollock
    National Instruments
    Attachments:
    Alyeska 4.vi ‏19 KB

  • Receive Data from SOAP

    Hi All,
    This is another question regarding SOAP again. The requirement is our customer will send the asynchronous text messages in one tag of XML like
    <header>
    <Field> Text message</field>
    </header>
    I need to have the webservice in XI to receive this field message and save it in the folder.
    Can any one help me to achive this in XI ?
    Laks

    Abhishiek,
    The requirement is like customer will be sending the text content in a single tag of xml though the webservice i create.
    I planned to create the webservice like
    <Header>
    <field>Text content</field>
    </header>
    So the customer can access this webservice and send their data in Field tag.
    I created the datatype with the structure as mentioned above, and related message type and message interface.
    I can create the sender service and its communication channal as SOAP .
    Receive service and its communication channal as file. 
    Now my question is , Do I need any interface mapping for that or not as there is no target structure..  I just need to process that request and save that content in file.
    Hope u understand the requirement. I am new to SOAP to XI scenario .
    Laks

  • PI only received data from SAP on the 2nd or 3rd time sent

    Hi experts,
    We were facing some problem with our RFC connection.
    When I execute it for the first and the second time with the same parameters, PI received it. But its not for the third time. But successfull again on the 4th time, This all happens in more than 60 seconds intervals. The third message is in sm37 with status finished but not in processed messages in PI. Where does the message go then?
    Then when I really wait for 10 minutes and send every data all 3 messages go through to PI. Is there any system parameter is controlling this? Or the error is in the program?
    Thanks.
    Regards,
    Thava

    Hi,
    There is no messages stucked in sm58 of sender system.
    Thanks.
    Regards,
    Thava
    Edited by: Thavachelvi Velautham on Jul 28, 2011 6:01 PM

  • Subscriber does not receive data from MDB

    The mapMessage.getString() is allways null in the following run method of a Thread. The same in the MDB direct outputs data.
    public void run() {
         while (true) {
              try{
                   System.out.println("run...");
                   Message msg = getSubscriber().receive(0);
                   MapMessage mapMessage = (MapMessage) msg;
                   String rssfeed = mapMessage.getString("rssfeed");
                   this.applet.rssfeed = rssfeed;
                   System.out.println("feed: " + rssfeed);
              }catch(Exception e){
                   e.printStackTrace();
              applet.repaint();
    }There is a Warning-message if JBoss4 starts:
    16:13:00,379 WARN [JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/RssTopic
    The JBoss Console entries are like:
    jndiName=local/RssMessageBean@12974590,plugin=pool,service=EJB
    jndiName=local/RssMessageBean@12974590,service=EJB
    Don't know if the MDB is registered correct?
    EJB
    <message-driven>
          <ejb-name>RssMessageBean</ejb-name>
          <ejb-class>ejb.RssMessageBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
            <destination-type>javax.jms.Topic</destination-type>
            <subscription-durability>NonDurable</subscription-durability>
          </message-driven-destination>        
    </message-driven>JBoss XML
    <message-driven>
          <ejb-name>RssMessageBean</ejb-name>
          <configuration-name>Standard Message Driven Bean</configuration-name>
          <destination-jndi-name>topic/RssTopic</destination-jndi-name>
    </message-driven>

    Hi,
    I believe you have a service request open about this issue as well.  I just wanted to let you know I am currently working on the issue and will report back anything additional information.
    Regards,
    Greg H.
    Applications Engineer
    National Instruments

  • URGENT: Migrating AR(Receivables) data from 11.5 to R12

    Hi All,
    I have requirement like below..
    I have to migrate the AR data(invoices and receipts) from 11.5.5 to R12.
    can we migrate closed invoices as well as open invoices?
    about receipts, how can we migrate applied receipts as well as unapplied receipts?
    what all are the things we need to take care(like column mapping and other things)?
    please respond, its bit urgent.
    Thanks
    Edited by: user627525 on Feb 12, 2009 10:39 PM
    Edited by: user627525 on Feb 17, 2009 10:55 PM

    Usually only Open Invoices and Unapplied Receipts are migrated from Old system to New Instance.
    Post Migration Reconciliation shall be tough in that scenario. Reconsider/Rediscuss with Client.
    Migration can be done using APIs or Custom Scripts using Standard Interfaces.
    Hope this is helpful
    Regards,
    Sridhar

  • How to receive data from an external application

    In one of our requirements we would have to make use of the resume/suspend plug in Web Dynpro Abap. Would anyone happen to have any other information on this topic. Is there a sample program available which demonstrates the same?
    The requirement is that, I have to call an external window (output screen) from my present screen (input screen). While this external window is active, the calling window (input screen) should be disabled. When the external window (output screen) is closed the input screen should be enabled again. The external window returns a parameter list and this needs to be received by my application. I have read that suspend/resume plugs can be used for this. However, I have not been able to figure out how to use them.
    Additionally, is there any other approach for achieving the above functionality.

    Hello Hari,
    Refer these links for understanding the usage of suspend/resume plugs.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/68/3aee42c4257176e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/68/3aee42c4257176e10000000a1550b0/frameset.htm
    Bala

  • Error while receiving data from infrastructure navigator server -- 5.8.3 against distributed vCenter 5.5

    Details...
    New install
    vCenter 5.5 build 2026576 in a distributed install, Server A MS SQL only, Server B SSO and web client, Server C Update manager and inventory, Server D vCenter service
    VIN 5.8.3.140 build 2170967
    I looked at and tried the recommendations in KB2044117 https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCAQFjAA&url=http%3A%2F%2Fkb.vmware.com%2Fkb%2F2044117&ei=LZ2dVP_4BcOnNum9gNAK&usg=AFQjCNFJUvvafrHpq5CluejRiVwWD0ZgCQ&sig2=dbADxFpPJ5giAHdYEz_vkA&bvm=bv.82001339,d.eXY
    No good.
    I did take a look at /var/log/vadm on the VIN and see several lines of "TCP Connection(xxxx)-Server B's IP com.vmware.vcext.vim.VcConnection -- Connecting to vCenter at Server D's IP" So it looks like it sees the request from the WWW client but then is trying to go to the vCenter service and not back to the WWW client.
    I ran into the support assistant not being supported in a distributed vCenter install, and am left wondering if the same is true with VIN...
    It also leaves me in a "tough spot" in that the uninstall instructions require access to a working web client interface to VIN which I do not have...
    Any ideas as to what else I might try here?

    Solved but not happy!
    VIN is not compatible with a web UI that uses standard ports, i.e. TCP 80 and 443. No notes (at least that I seen) in the documents stating this as a requirement.
    KB 2065986
    VMware KB: VMware vRealize Infrastructure Navigator is not accessible when the vSphere Web Client is not running on …

Maybe you are looking for

  • External swf button problem

    Hi, I have an external photo gallery with a previous and next buttons that loads into a main swf. When I test the external swf on its own the buttons work fine. But, when I load the external swf in the main swf the buttons work once and to make them

  • Change lineitems for MIRO Transaction

    Hi We are using ECC 6.0 version. Our requirement is to change line item data in the MIRO before save. It would be a great help if you can provide any BAdI or User Exits. Regards

  • Accessing Sender Agreement details in Module

    Hi, How can we access(read and then modify) the sender agreement details from SOAP header in from ModuleData in the Module interface? One way I can think of is to read the SOAP message and parse it. The problem lies with accessing the SOAP message in

  • JDeveloper 12c with JDE 9.1 Standalone

    Hi all, I'm trying to use JDeveloper 12c with JDE 9.1 Standalone to study Business Services, How I can make it works? Tks, Diego Borin.

  • Extension Building with multiple CS versions in mind

    Good Morning. We are currently working on several InDesign projects which must support and continue to support InDesign CS5, CS 5.5, CS6 and CC.  We are currently using the Extension Builder Flex based UI's with supporting ExtendScript libraries. We