paypal payment interface (switch)

2010-04-23  来源:本站原创  分类:Industry  人气:300 

Original Address:
It must understand the basics:
IPN's principle is very simple when produced after a transaction, the transaction status changes, such as the user has paid, or refund, revoked, Paypal use of commonly used HTTP POST method, will trade some of the variables submitted to the site a page (called IPN Handler), when the page receives the request when the data intact would be to add a direct verification of the cmd = _notify-validate, POST interface back to Paypal address, if the data is correct, then Paypal returns the string VERIFIED, otherwise INVALID, if the result is VERIFIED, then your program can use the data to operate.

However, the debug code is a very painful thing, because as a third-party developers, it is impossible to open two accounts, transactions between each test but also some money, so Paypal Sandbox specifically developed to developers for development, first to https: / / / register a development account, well into the Sandbox after the establishment of a virtual test of the Paypal account (at least to establish a Business and a Personal's), this method of registration and the Paypal account of process, as information can be false, including bank account numbers, credit card (actually Paypal Sandbox will automatically generate a random number). Then need to activate the virtual Paypal Sandbox accounts, pay attention, no matter where you fill in the registration Paypal Sanbox what e-mail address, any mail sent to the virtual account filled messages are deposited in the Development Account in the Email management interface page ( navigation bar available). Login Virtual Sandbox

Paypal environment, also need to verify that the virtual bank account, where you can easily fill in, and then to the account through Add Funds to recharge (the number of Reclamation to fill in the number)

The detailed settings on the IPN

Log in to Paypal back into the My Account-> Profile page, click on Instant Payment Notification, as below:

Then will appear the following page, and click the Edit button, as shown:

Then the following page will appear, and the page inside the box office tick, and fill out the following Notification URL Service: http:// your website address / index.php? GOo = cGF5cGFsX3JlcGx5LnBocA & then click the Save button the following diagram:

Then the page will prompt you: "You have successfully activated Instant Payment Notification."

Then re-enter the My Account-> Profile page, click on Website Payment Preferences, as shown below:

And then will enter Website Payment Preferences page, in which to do four things:
1: Auto Return On the back of tick
2: Return URL behind the input: http:// your website address / index.php? GOo = cGF5cGFsX3JlcGx5X3JldHVybi5waHA &
3: Payment Data Transfer On the back of tick
4: above all do a good job, click on the Save button on the bottom page the following chart:

Save the page immediately after the jump to the My Account-> Profile, and prompts you to set up, which will have a bunch of identity token number, that is the private key, as shown below:

Of course, this private key (identity token) will only appear this time, after you've set up, you can still enter the Website Payment Preferences page to view it, it was in the Payment Data Transfer a block, as shown below:

Next, we tested, it should be Paypal interface address is set to https: / / / cgi-bin / webscr

Finally the basic process:
Users to choose products on our website, add to shopping cart, then check the website under the shopping cart ready to pay in goods, produce Paypal payment form (also submitted to the above with the Paypal IPN interface, address), contains the transaction some of the information (the next will be specifically looking for the opportunity to explain). And in its own database to generate an order record. Paypal in the Session in the record these transactions using Paypal account information users log Paypal (Sandbox Sandbox using the virtual account number), review details, click on the Pay button and Paypal transaction processing, if our Paypal account in the acceptance of accounts receivable does not have any problem (no particular need to Accept the place), completion of the transaction, it will send a Paypal IPN, and send prompt messages.
IPN Handler we receive information, first of all to Paypal for verification, if the information is correct, then according to the information and to compare their database, if correct, you can save payment information, and modify the order status.
Then Paypal will display an interface that completion of the transaction, then if the user clicks "Return" button, Paypal will be the user back to the designated place on our website.
Welcome back to our site users, thanks to the user, and be reminded, order number, etc. are given.
If clear text, then it and the compressed file inside paypal.htm general

<form target="paypal" action="" method="post">
<input type="image" src="/uploadfile/2010/0101/20100101125037948.gif" border="0" name="submit" alt="PayPal
is the safer, easier way to pay - PayPal">
<!-- Once the purchase
<input type="hidden" name="add" value="1">-->
<!-- This is not an integrated shopping cart, if the code is   value="_cart" Represents a PayPal shopping cart ready  . -->
<input type="hidden" name="cmd" value="_xclick">
<!-- The seller's PayPal account  -->
<input type="hidden" name="business" value="[email protected]">
<!-- This is from my Web site delivered by the trade name and order number   -->
<input type="hidden" name="item_name" value="BoAo International Trading 20071212s1p1u1">
<input type="hidden" name="item_number" value="20071212s1p1u1">
<!-- This is the price, how can I transfer won't say  ~ -->
<input type="hidden" name="amount" value="15">
<!-- Quantity   -->
<input type="hidden" name="quantity" value="1">
<!-- Currency type   CNY: RMB  ,USD: US dollar  -->
<input type="hidden" name="currency_code" value="USD">
<!-- Cancel the transactions and the location to return  -->
<input type="hidden" name="cancel_return" value="">
<!-- Transactions after the returned location  -->
<input type="hidden" name="return" value="">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="charset" value="UTF-8">
<input type="hidden" name="notify_url" value="">
<input type="hidden" name="add" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="bn" value="PP-BuyNowBF">

Some of the folders and files a brief description: [App_Code] put a few necessary classes
[Bin] deposited the payment interface of a DLL file to decrypt the encrypted
[EWPcert] systems need to use a security certificate
CheckOut.aspx equivalent of B2C Web site shopping cart, the program from here
NotifyUrl.ashx 2 times POST security authentication page, the more important
PDTResponse.aspx page for return information, we can achieve through this page, it's a series of transactions into their own database of information used to verify whether the user has paid
---------[ App_Code ]-----------
CHECK OUT] [ButtonEncryption.cs encrypted password string button, equivalent to some of the basic parameters it expressly direct encrypted
Constants.cs global variable, used for storing settings of some basic information PAYPAL
NVPCodec.cs code conversion
Utils.cs for security authentication when used
---------[ EWPcert ]-----------
sandbox_cert_pem.txt PAYPAL public certificate
sdk-ewp.p12 a similar certificate like some of it, to not know much about this [

  • paypal payment interface (switch) 2010-04-23

    Original Address: It must understand the basics: IPN's principle is very simple when produced after a transaction, the transaction status changes, such as the user has paid, or refund, revoked, Paypal use

  • PayPal payment interface of the PHP development approach 2011-01-14

    PHP parsing PayPal payment interface development methods we all know PHP code and uses a convenient place, so today we will explain to you in detail how to use PayPal payment interface PHP to develop relevant content, we want to help. PayPal fast, sa

  • Paypal payment settings 2011-04-20

    Paypal payment settings there are many, here we set the standard Paypal payment: Website Payments Standard. Suppose you have a Paypal account, such as [email protected] Step I. Set Paypal account into the System-> Configuration-> Paypal Accounts Step

  • j2me advanced interface and low-level interface switch 2010-07-22

    Doing today with the j2me application when the need for low-level interface to receive user input data. Never done before, finishing a little, write an example. Keep it for reference; reads as follows: import javax.microedition.lcdui.Canvas; import j

  • Flex development process on the understanding of the interface switch 2010-09-29

    1. You can use the interface to switch PopUpManager 2. Use of state (state), since the definition of some state events (StateEvent), in index.mxml (mx: application) in monitoring the status of distributed components of event type, by changing the sta

  • Application of e-commerce site payment interface 2010-12-03

    Alipay pure security Alipay (interface site: is the advanced online payment platform, no pre-paid / annual fee, single rate of 1.5%, no flow limitation. Apply online now Application of the annex as follows: TenPay immediate

  • Money paid through online payment interface process and principle payment (transfer) 2011-01-10

    1 business generated according to customers' payment behavior orders, including merchant number, order number, amount, and other pay elements, and submit the payment request. 2 users pay a successful, money paid through the use of call back method wi

  • Construction Bank online payment interface and automated reconciliation 2011-08-30

    First, concerning the payment of: Recently made a java language CCB online payment system, and CCB do interface. Now sort out release. Prior to development, with reference to illustrious Soviet flying students an article he wrote is very good, very c

  • Principle of drawing Adroid UI interface (switch) 2010-09-28

    View class contains Surface (variable name mSurface). Surface contains CompatibleCanvas (variable name mCanvas). CompatibleCanvas successor to Canval (java.awt.Canval), which contains a Matrix object Matrix (variable name mOrigMatrix). Matrix Matrix

  • YunTable Development Diary (3) - BigTable data model and call interface (switch) 2010-12-20

    This in-depth analysis of BigTable data model, and describes how it is invoked. Data model Like I said before, as to the fact BigTable the name suggests, is a very large table, and is able to store billions of rows of a (Row) and thousands of columns

  • Android Activity interface switch to add animation effects (transfer) 2010-11-02

    After the Android 2.0 has overridePendingTransition (), of which there are two parameters, one is the withdrawal of the previous activity twenty-one entry activity, @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta

  • Android Activity interface switch to add animation effects (reproduced) 2011-06-01

    "Disclaimer: This article is reproduced only come, not yet read" After the Android 2.0 has overridePendingTransition (), of which there are two parameters, one is the withdrawal of the previous activity twenty-one entry activity, @ Override publ

  • paypal online payment of communication interface 2010-11-25

    paypal online payment of communication interfaces ★ ★ ★ This is the original, you need to quote reprint friend please specify: "", Thank you! ★ ★ ★ This will describe the communication with the paypal onl

  • Registration and use PayPal Guide 2010-05-12

    Original Source: 1, PayPal is the What Paypal is a very popular payment instrument, similar to domestic Alipay, TenPay so. For domestic users, only use Dual Currency Visa or MasterCard credit card payments, etc., when n

  • Online payment principle 2010-06-26

    To open an e-commerce site online payment capabilities, there are two ways: first through third party payment platform, such as Paypal, Net Bank, etc.; two negotiating with banks to get a payment interfaces. A way to pay for pre-Po, for example, busi

  • PHP payal payments Developing Detail Explain Interface 2010-07-28

    Register for PayPal Web site: https: / / paypal interface and other interfaces are different, a little more complicated. Mention here the so-called paypal ipn (Instant Payment Notification), is the Paypal can take the initiative to in

  • Alipay interface (Reprinted) 2010-08-11

    Have said before and paypal online payment interface communication, paypal interface mainly used for international commerce, and domestic e-commerce, generally considered the current terms of Alibaba's Alipay, the following will detail how to integra

  • Net bank online payment interfaces and applications 2010-09-03

    Keywords: internet banking online payment interface and application projects in the recent concern about online payment, so look at the documentation, online payment application development: All online payments are basically the following ways: Click

  • Thinking of mobile payment (Reprinted) 2010-10-28

    October 20, 2010 Suzg No comments Today, after listening Alipay payments and mobile Internet Summit, it was introduced Alipay mobile payment. The payment was mentioned, is Apple's IAP (In-App Purchase) is similar to the application by calling the int

  • Design of integrated third-party payment project 2010-12-03

    Now more and more projects are required to integrate third-party payment platform, especially in the Internet project, the following briefly to integrate third-party payment platform project design and implementation ideas. Currently with more than t