Facebook Page
https://www.facebook.com/robertleahong
Tuesday, April 24, 2012
WHAT IS THE PURPOSE OF AN IPN SCRIPT
The Purpose of the IPN Script is to Update Database at Ecommerce
Website after Payment at Pay Pal e.g
(i) Adding an Order after Payment By Customer at Pay Pal.
(ii) Adding Payment Record To
(A) Affiliate
(B) Vendor
(C) Royalty
ACCOUNT WITH PAY PAL PAYMENT
(inorder to zero out Account Balance) so as to prevent
duplication of payments- since only account with a Balance
will appear in the Browser for Payment.
Friday, April 20, 2012
INITIAL STEPS TO TAKE TO BENEFIT FROM INTEGRATION
(1) Open a Business Account at Pay Pal Website
(2) VERIFY ACCOUNT use
(i) Debit Card
(ii) Credit Card
(iii) US Bank Account
If your Pay Pal Account will be used for receiving revenue
from Ecommerce Website , hence would not need to make payments VIA Credit Card;
The use of a card (Debit Or Credit) would be just to verify
your Business Account so you can start receiving funds . Therefore
if your not a resident in U.S.A (e.g Jamaican) hence don't have a
U.S Bank Account; and can only verify your account with a Debit or Credit Card, why not use a Visa Debit Card from a Local Bank
or branch(e.g Nova Scotia Branch).
USING DEBIT CARD TO VERIFY
If you are a Jamaican e.g get a Visa Debit Card
from Bank such as Nova Scotia
(i) Branch by opening Bank Account, if you have
not already done so.
(ii) Click "Verify Account" Link at your Pay Pal
Website.
(iii) Enter your Card number.
(3) Email Address Matches Pay Pal Business
Account
For individuals or Company to receive Payments from
Ecommerce Website
(A) AFFILIATE
(B) VENDORS ( e.g at CLICKBANK.COM)
(C) ROYALTY CREDITORS
(Produce, Distributor, Writer, Artist, Musician)
at Music Ecommerce Website
When the user attempts Register an account
(Affiliate, Vendor, Royalty Creditor) he or she must ensure
that the Email Address matches one of Ecommerce Website
Account holder's Pay Pal Business Account.
(2) VERIFY ACCOUNT use
(i) Debit Card
(ii) Credit Card
(iii) US Bank Account
If your Pay Pal Account will be used for receiving revenue
from Ecommerce Website , hence would not need to make payments VIA Credit Card;
The use of a card (Debit Or Credit) would be just to verify
your Business Account so you can start receiving funds . Therefore
if your not a resident in U.S.A (e.g Jamaican) hence don't have a
U.S Bank Account; and can only verify your account with a Debit or Credit Card, why not use a Visa Debit Card from a Local Bank
or branch(e.g Nova Scotia Branch).
USING DEBIT CARD TO VERIFY
If you are a Jamaican e.g get a Visa Debit Card
from Bank such as Nova Scotia
(i) Branch by opening Bank Account, if you have
not already done so.
(ii) Click "Verify Account" Link at your Pay Pal
Website.
(iii) Enter your Card number.
(3) Email Address Matches Pay Pal Business
Account
For individuals or Company to receive Payments from
Ecommerce Website
(A) AFFILIATE
(B) VENDORS ( e.g at CLICKBANK.COM)
(C) ROYALTY CREDITORS
(Produce, Distributor, Writer, Artist, Musician)
at Music Ecommerce Website
When the user attempts Register an account
(Affiliate, Vendor, Royalty Creditor) he or she must ensure
that the Email Address matches one of Ecommerce Website
Account holder's Pay Pal Business Account.
PAY PAL INTEGRATION THE SOLUTION FOR SMALL COMPANIES OVER THE INTERNET
(1) INCREASE SALES AT YOUR ECOMMERCE WEBSITE USING SAFE CREDIT
CARD PAYMENTS.
(2) ALLOW AUTOMATIC DOWNLOAD AFTER PAY PAL PAYMENTS
(3) ALLOWS CUSTOMER PAYMENTS TO BE DEPOSITED INTO PAY PAL BUSINESS
ACCOUNT OF WEBSITE OWNER(ECOMMERCE)AUTOMATICALLY.
Thursday, April 12, 2012
UPDATING OF DATABASE(ROYALTY ACCOUNT) AT ECOMMERCE WEBSITE(ASP) WITH PAY PAL PAYMENTS AUTOMATICALLY
UPDATING ECOMMERCE WEBSITE DATABASE
(ROYALTY ACCOUNT) USING ASP IPN SCRIPT
REM **********************************************************************
(ROYALTY ACCOUNT) USING ASP IPN SCRIPT
REM **********************************************************************
http://www.bobbyreggae.com/ROYALTYIPN_LISTENER.ASP
REM **********************************************************************
REM Retrieve Information Transferred From Pay Pal To IPN Script
REM **********************************************************************
ITEM_NAME = Request.Form("item_name")
HCURRENT_BALANCE = Request.Form("amount")
REM **********************************************************************
SET FROYALTYACCOUNT=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SQLACCOUNT=" SELECT * FROM ROYALTYACCOUNT "
FROYALTYACCOUNT.OPEN SQLACCOUNT, CON
REGGAEFLG=0
IF FROYALTYACCOUNT.BOF THEN
IF FROYALTYACCOUNT.EOF THEN
REGGAEFLG=1
END IF
END IF
IF REGGAEFLG=0 THEN
FROYALTYACCOUNT.MOVEFIRST
DO WHILE NOT FROYALTYACCOUNT.EOF
IF ISNULL(FROYALTYACCOUNT("CODE")) THEN
HCODE=0
ELSE
HCODE=FROYALTYACCOUNT("CODE")
END IF
HDESCRIPTION =FROYALTYACCOUNT("DESCRIPTION")
HDESCRIPTION =TRIM(HDESCRIPTION)
POS = INSTR(HITEM_NAME, HDESCRIPTION)
IF POS=0 THEN
ELSE
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
END IF
FROYALTYACCOUNT.MOVENEXT
END IF
IF HHROYALTYCREDITOR="DISTRIBUTOR" THEN
ZERO = 0
Set FDISTRIBUTOR=Server.CreateObject("ADODB.Recordset")
SQLDISTRIBUTOR=" SELECT * FROM DISTRIBUTOR "
SQLDISTRIBUTOR= SQLDISTRIBUTOR & ” WHERE Instr(ITEM_NAME, ACCOUNT_NAME) <>”
SQLDISTRIBUTOR= SQLDISTRIBUTOR & ZERO
FDISTRIBUTOR.Open SQLDISTRIBUTOR, con
reggaeflg=0
If FDISTRIBUTOR.Bof Then
If FDISTRIBUTOR.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FDISTRIBUTOR("ACCNO")) then
HHACCOUNT_NUMBER=0
Else
HHACCOUNT_NUMBER=FDISTRIBUTOR("ACCNO")
End If
End If
END IF
IF HHROYALTYCREDITOR="PRODUCER" THEN
Set FPRODUCER=Server.CreateObject("ADODB.Recordset")
SQLPRODUCER=" SELECT * FROM PRODUCER "
SQLPRODUCER= SQLPRODUCER & ” WHERE Instr(ITEM_NAME, PRODUCER_NAME) <>”
SQLPRODUCER= SQLPRODUCER & ZERO
FPRODUCER.Open SQLPRODUCER, con
reggaeflg=0
If FPRODUCER.Bof Then
If FPRODUCER.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FPRODUCER("PRODUCER_CODE")) then
HHACCOUNT_NUMBER=0
Else
HHACCOUNT_NUMBER=FPRODUCER("PRODUCER_CODE")
End If
End If
FPRODUCER.Open SQLPRODUCER, con
reggaeflg=0
If FPRODUCER.Bof Then
If FPRODUCER.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FPRODUCER("PRODUCER_CODE")) then
HHACCOUNT_NUMBER =0
Else
HHACCOUNT_NUMBER =FPRODUCER("PRODUCER_CODE")
End If
End If
END IF
IF HHROYALTYCREDITOR="WRITER" THEN
Set FWRITER=Server.CreateObject("ADODB.Recordset")
SQLWRITER=" SELECT * FROM WRITER "
SQLWRITER= SQLWRITER & ” WHERE Instr(ITEM_NAME, WRITER_NAME) <>”
SQLWRITER= SQLWRITER & ZERO
FWRITER.Open SQLWRITER, con
reggaeflg=0
If FWRITER.Bof Then
If FWRITER.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FWRITER("WRITER_CODE")) then
HHACCOUNT_NUMBER=0
Else
HHACCOUNT_NUMBER=FWRITER("WRITER_CODE")
End If
End If
END IF
IF HHROYALTYCREDITOR="ARTIST" THEN
Set FARTIST=Server.CreateObject("ADODB.Recordset")
SQLARTIST=" SELECT * FROM ARTIST "
SQLARTIST= SQLARTIST & ” WHERE Instr(ITEM_NAME, ARTIST_NAME) <>”
SQLARTIST= SQLARTIST & ZERO
FARTIST.Open SQLARTIST, con
reggaeflg=0
If FARTIST.Bof Then
If FARTIST.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FARTIST("ARTCOD")) then
HHACCOUNT_NUMBER=0
Else
HHACCOUNT_NUMBER=FARTIST("ARTCOD")
End If
END IF
SET FALBUMSINGLE=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SQLALBUM=" SELECT * FROM ALBUMSINGLE "
FALBUMSINGLE.OPEN SQLALBUM, CON
REGGAEFLG=0
IF FALBUMSINGLE.BOF THEN
IF FALBUMSINGLE.EOF THEN
REGGAEFLG=1
END IF
END IF
IF REGGAEFLG=0 THEN
FALBUMSINGLE.MOVEFIRST
DO WHILE NOT FALBUMSINGLE.EOF
IF ISNULL(FALBUMSINGLE("CODE")) THEN
HCODE=0
ELSE
HCODE=FALBUMSINGLE("CODE")
END IF
HDESCRIPTION =FALBUMSINGLE("DESCRIPTION")
HDESCRIPTION =TRIM(HDESCRIPTION)
POS = INSTR(HITEM_NAME, HDESCRIPTION)
IF POS=0 THEN
ELSE
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
END IF
FALBUMSINGLE.MOVENEXT
END IF
IF HHDESCRIPTION="ALBUM" THEN
SET FALBUM=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SQLALBUM=" SELECT * FROM ALBUM "
SQLALBUM= SQLALBUM & ” WHERE Instr(ITEM_NAME, ALBUMNAM) <>”
SQLALBUM= SQLALBUM & ZERO
FALBUM.Open SQLALBUM, con
reggaeflg=0
If FALBUM.Bof Then
If FALBUM.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FALBUM("ALBUMCOD")) then
HHALBUMCOD=0
Else
HHALBUMCOD=FALBUM("ALBUMCOD")
End If
END IF
END IF
IF HHDESCRIPTION="SINGLE" THEN
SET FSONGFIL=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SQLSONG=" SELECT * FROM SONGFIL "
SQLSONG= SQLSONG & ” WHERE Instr(ITEM_NAME, SONGTITLE) <>”
SQLSONG= SQLSONG & ZERO
FSONGFIL.Open SQLSONG, con
reggaeflg=0
If FSONGFIL.Bof Then
If FSONGFIL.Eof then
reggaeflg=1
End If
End If
If reggaeflg=0 Then
If Isnull(FSONGFIL("SONGCOD")) then
HHSONGCOD=0
Else
HHSONGCOD=FSONGFIL("SONGCOD")
End If
END IF
END IF
REM **************************************************************
USE INFORMATION SENT FROM PAY PAL TO UPDATE ROYALTY ACCOUNT
With Payment Details made at Pay Pal To Royalty Creditors
( Distributor, Producer, Song Writer, Artist( Singer, Musician )
REM ***************************************************************
HCMPID=1
SET FNUMBERS=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SQLNUMB=" SELECT * FROM NUMBERS "
SQLNUMB=SQLNUMB & " WHERE CMPID=" & HCMPID
FNUMBERS.OPEN SQLNUMB, CON
REGGAEFLG=0
IF FNUMBERS.BOF THEN
IF FNUMBERS.EOF THEN
REGGAEFLG=1
END IF
END IF
IF REGGAEFLG=0 THEN
IF ISNULL(FNUMBERS("TRNSNO")) THEN
HTRNSNO=0
ELSE
HTRNSNO=FNUMBERS("TRNSNO")
END IF
HTRNSNO=HTRNSNO + 1
NUMBSQL=" UPDATE NUMBERS SET "
NUMBSQL=NUMBSQL & " TRNSNO=" & HTRNSNO
NUMBSQL=NUMBSQL & " WHERE CMPID=" & HCMPID
CON.EXECUTE NUMBSQL
END IF
HTRNSDAT = DATE()
HTRNSTYPE = “R” rem Payment
REM ************************************************************
ADDITION OF PAYMENT TRANSACTION TO ROYALTY ACCOUNT
Inorder To ZERO Out Balance To prevent Duplication
Of Payment( Only Account With a Balance Can Result
In a Payment To Royalty Creditors Pay Pal Business
Account.)
REM ************************************************************
SQLSLEDGE=" INSERT INTO ROYALTYLEDGER VALUES "
SQLSLEDGE=SQLSLEDGE & "('"
SQLSLEDGE=SQLSLEDGE & HTRNSNO & "','"
SQLSLEDGE=SQLSLEDGE & HTRNSDAT & "','"
SQLSLEDGE=SQLSLEDGE & HACCOUNT_NUMBER & "','"
SQLSLEDGE=SQLSLEDGE & HTRNSTYPE & "','"
SQLSLEDGE=SQLSLEDGE & HCODE & "','"
SQLSLEDGE=SQLSLEDGE & HHALBUMCOD & "','"
SQLSLEDGE=SQLSLEDGE & HCURRENT_BALANCE & "')"
CON.EXECUTE SQLSLEDGE
REM **************************************************************
UPDATING OF ROYALTY ACCOUNT (USING PHP IPN SCRIPT) AT ECOMMERCE WEBSITE WITH PAY PAL PAYMENTS
PHP PAY PAL IPN SCRIPT
ROYALTYIPN_LISTENER.PHP
$ITEM_NAME = Request.Form("item_name");
$CURRENT_BALANCE = Request.Form("amount");
$SQLROYALTY =" SELECT * FROM ROYALTYCREDITOR ";
$FROYALTYCREDITOR = mysql_query( $SQLROYALTY, $CON );
while ( $ROWS = mysql_fetch_object( $FROYALTYCREDITOR )) {
$ROYALTY_CODE = $ROWS->ROYALTY_CODE;
$ROYALTYCREDITOR = $ROWS->ROYALTYCREDITOR;
$POSITION = strpos($ITEM_NAME, $ROYALTYCREDITOR);
if ( $POSITION == 0 ) {
}
else {
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
}
}
if ( $ROYALTYCREDITOR == "DISTRIBUTOR" ) {
$SQLDISTRIBUTOR=" SELECT * FROM DISTRIBUTOR ";
}
if ( $ROYALTYCREDITOR == "PRODUCER" ) {
$SQLPRODUCER =" SELECT * FROM PRODUCER "
$SQLPRODUCER.=” WHERE strpos($item_name, PRODUCERNAM) !=”
$SQLPRODUCER.= $ZERO;
$FPRODUCER = myql_query ( $SQLPRODUCER , $CON );
$anymatch= mysql_num_rows($FPRODUCER);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FPRODUCER )) {
$ACCOUNT_NUMBER = $CREDITOR->PRODUCERCOD;
}
}
if ( $ROYALTYCREDITOR == "WRITER" ) {
$ZERO = 0;
$SQLWRITER =" SELECT * FROM WRITER "
$SQLWRITER.=” WHERE strpos($item_name, WRITERNAM) !=”
$SQLWRITER.= $ZERO;
$FWRITER = mysql_query ( $SQLWRITER , $CON );
$anymatch= mysql_num_rows($FWRITER);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FWRITER )) {
$ACCOUNT_NUMBER = $CREDITOR->WRITERCOD;
}
}
if ( $ROYALTYCREDITOR == "ARTIST" ) {
$SQLARTIST=" SELECT * FROM ARTIST ";
$SQLARTIST.=” WHERE strpos($item_name, ARTNAM) !=”
$SQLARTIST.= $ZERO;
$FARTIST = myql_query ( $SQLARTIST , $CON );
$anymatch= mysql_num_rows($FARTIST);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FARTIST )) {
$ACCOUNT_NUMBER = $CREDITOR->ARTCOD;
}
}
$SQLCATEGORY = " SELECT * FROM ALBUMSINGLE ";
$FALBUMSINGLE= mysql_query ( $SQLCATEGORY, $CON );
while ( $CATEGORY = mysql_fetch_object($FALBUMSINGLE)) {
$CODE = $CATEGORY->CODE;
$DESCRIPTION = $CATEGORY->DESCRIPTION;
$POSITION = strpos($ITEM_NAME, $DESCRIPTION)
if ( $POSITION == 0 ) {
}
else {
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
}
}
if ( $DESCRIPTION == "ALBUM" ) {
$SQLALBUM =" SELECT * FROM ALBUM ";
$SQLALBUM.=” WHERE strpos($item_name, ALBUMNAM) !=”
$SQLALBUM.= $ZERO;
$FALBUM = myql_query ( $SQLALBUM , $CON );
$anymatch= mysql_num_rows($FALBUM);
if ( $anymatch == 0 ) {
}
else {
$RECORD = mysql_fetch_object ( $FALBUM );
$ALBUMCOD = $RECORD->ALBUMCOD;
}
}
if ( $DESCRIPTION == "SINGLE" ) {
$SQLSONG =" SELECT * FROM SONGFIL ";
$SQLSONG .=” WHERE strpos($item_name, SONGTITLE) !=”
$SQLSONG .= $ZERO;
$FSONGFIL = myql_query ( $SQLSONG , $CON );
$anymatch= mysql_num_rows($FALBUM);
if ( $anymatch == 0 ) {
}
else {
$RECORD = mysql_fetch_object ( $FSONGFIL );
$SONGCOD = $RECORD->SONGCOD;
}
}
$SQLNUMBER =" SELECT * FROM NUMBERS ";
$FNUMBERS = mysql_query( $SQLNUMBER, $CON );
$NUMBER = mysql_fetch_object( $FNUMBERS );
$TRNSNO = $NUMBER->TRNSNO;
$TRNSNO = $TRNSNO + 1;
$NUMBSQL =" UPDATE NUMBERS SET ";
$NUMBSQL .=" TRNSNO=" . $TRNSNO;
$NUMBSQL .=" WHERE CMPID=" & $CMPID;
$TRNSTYPE = "R";
$SQLSLEDGE=" INSERT INTO ROYALTYLEDGER VALUES " ;
$SQLSLEDGE= "(" ;
$SQLSLEDGE= $TRNSNO . "," ;
$SQLSLEDGE= $TRNSDAT . "," ;
$SQLSLEDGE= $ACCOUNT_NUMBER . "," ;
$SQLSLEDGE= $TRNSTYPE . "," ;
$SQLSLEDGE= $CODE . "," ;
$SQLSLEDGE= $ALBUMCOD . "," ;
$SQLSLEDGE= $CURRENT_BALANCE . ")" ;
Subscribe to:
Posts (Atom)