1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with payment process ReadMe info

Discussion in 'eCommerce' started by chrisj, Oct 24, 2009.

  1. #1
    I'm installing Amazon Simple Pay (like paypal) and I need some help with the instructions that read:
    "A customer clicks on your Amazon SimplePay button
    The customer is redirected to the co-branded user interface pipeline where they enter their payment credentials.
    After the customer completes the pipeline they are redirected back to your website.
    When the transaction completes, Amazon SimplePay will send an Instant Payment Notification (IPN) to your IPN script.
    The IPN script receives data in the $_POST variable.
    Use the SimplePay_IPN class to validate the IPN and then take the appropriate action."

    <pre>
    			require 'SimplePay_IPN.php';
    						// Create a new SimplePay IPN validator, passing your AWS Secret Access Key
    			$SimplePayIPN = new SimplePay_IPN(AWS_SECRET_ACCESS_KEY);
    			/**
    			 * Pass the $_POST variables to the IPN validator
    			 * $SimplePayIPN->isValid($_POST) will return true if the POST fields match up with the signature from Amazon SimplePay
    			 * $SimplePayIPN->isValid($_POST) will return false if the generated signature does not match
    			 */
    			if ($SimplePayIPN->isValid($_POST)) {
    				// The POST signature is valid
    				// Process the IPN -- log the data, update your database, etc...
    			} else {
    				// The POST signature is not valid
    				// Log the invalid IPN and take any needed actions
    </pre>
    Code (markup):
    The part I'm interested in getting help with is the part about logging. Can you give some ideas about the logging? Their is a log.txt file with the install files, but I don't see any data after I process a payment. Any guesses about where the transaction data might be logged would be helpful. I'd ultimately like to see the transaction data retreived into a website file. Thanks.
     
    chrisj, Oct 24, 2009 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    In the code snippet I don't see the function which would log any data, you should insert the code of the preferred storing method /writing into file, mysql query/ into the suitable parts of the if-else conditions.
    Thanks
     
    Bagi Zoltán, Oct 25, 2009 IP
  3. nirajkum

    nirajkum Active Member

    Messages:
    815
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    can you post the whole code
     
    nirajkum, Oct 25, 2009 IP